Source: pie_chart_demo.f90
Build pie charts using both the stateful API and figure_t (exploded wedges, autopct, and start angles).
Outputs are written in PNG, PDF, and ASCII formats.
Run it with:
Generated media is written to output/example/fortran/pie_chart_demo/.
pie_chart_demo.f90 - Source codeoutput/example/fortran/pie_chart_demo/make example ARGS="pie_chart_demo"

ASCII output:
Clean energy capacity mix
+--------------------------------------------------------------------------------+
| |
| |
| |
| |
| |
| Storage |
| |
| |
| Solar |
| 12% |
| ----42%-------- ----- |
| -------------------- ------------ |
| ---------------------- -------------=- |
| ---------------------- ---------======== - Solar |
| ---------------------- ----=========18%=== Hydro = Wind |
| --------------------- +==================== % Hydro |
| --------------- +++++++++=============== # Storage |
| --------- +++++++++++++++++++======== |
| --- ++++++++++++++++++++++++++++ |
| +++++++++++++++++++28%+++++++ |
| +++++++++++++++++ |
| |
| |
| |
| Wind |
| |
| |
| |
| |
| |
+--------------------------------------------------------------------------------+

ASCII output:
Regional revenue share
+--------------------------------------------------------------------------------+
| |
| |
| |
| |
| Online |
| |
| |
| North |
| 15.0% |
| |
| ---30.0%-======== |
| ---------------============== |
| ------------------===============15.0% West - North |
| --------------------========== --------- = East |
| ---------------------===== --------------- % South |
| --------------------- --------------------- # West |
| -----------+++++++++ ========= ----------- @ Online |
| +-+++++++++++++++++++ ================== - |
| +++++++++++++++++++ =========18.0%== |
| +++++++++++++22.0%============ |
| +++++++++++++======= |
| South |
| |
| East |
| |
| |
| |
| |
| |
| |
+--------------------------------------------------------------------------------+