Open-Source-Spatial-Clean-Cooking-Tool / OnStove

This repository contain the general code for the Open Source Spatial Clean Cooking Tool OnStove
MIT License
7 stars 8 forks source link

Automate the plot generation (main text) #177

Closed camiloramirezgo closed 2 years ago

camiloramirezgo commented 2 years ago

Automate the Africa map creation, the individual graphs and the creation of the main combined graph.

camiloramirezgo commented 2 years ago

For this we can use matplotlib text to create the summary results for the map: https://matplotlib.org/3.3.4/gallery/recipes/placing_text_boxes.html combined with plt.axvline for the separation of data in the box: https://stackoverflow.com/questions/24988448/how-to-draw-vertical-lines-on-a-given-plot-in-matplotlib

Then we can merge all the plots using subplots: https://matplotlib.org/devdocs/gallery/subplots_axes_and_figures/subplots_demo.html and generate another text to annotate them (a, b, c, d)

However, as the graphs are being created with plotnine, we need to test how we can read those with matplotlib. An option would be to create all graphs individually and the read the files as images with matplotlib: https://stackoverflow.com/questions/35286540/display-an-image-with-python