I am working with a function that outputs a matplotlib Axes object, which shows a graph as well. The function is from the PointPats module, part of PySAL, specifically the QStatistic.plot() function. The graph that is being output is extremely compressed and I need to change the dimensions of the graph; however, I am not sure how to do that when working with just an axes object. Ideally I would like to add the axes to a figure, but I’m not sure how to do that with a standalone axes object.
I have tried to use the plt.figure.add_axes() function but get the following error message: The “Axes must have been created in the present figure”.
Rhea is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.