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
+--------------------------------------------------------------------------------+
| |
| |
| |
| - Solar |
| ----------### Storage = Wind |
| ------------- ###### % Hydro |
| ---Solar--------######### # Storage |
| ---------------- ######12%## |
| -----------42%---###########%% |
| ----------------- ########%%%%% |
| ------------------######%%%%%%%%% |
| ----------------- ###%%%%%%%%18%% Hydro |
| -----------------=%%%%%%%%%%%%%%%% |
| -------------- =====%%%%%%%%%%%% |
| ----------- ==========%%%%%%%%% |
| --------- ==========28%==%%%%% |
| ------ =====================% |
| -- ====================== |
| ======================= |
| ==============Wind |
| ========= |
| |
| |
| |
+--------------------------------------------------------------------------------+

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