I have an object fig2 that is a class mathplotlib.axes.axessubplot, but when I try to execute fig2.show(), python says axessubplot object has no attribute show. How can I show AxesSubplot?
3 Answers
Alternatively, you could call the figure attribute of your fig2:
fig2.figure
3 Comments
Wayne
Very useful with the objects a Seaborn lineplot presently returns. You can have the plot display again in another Jupyter cell without running all the code again.
Ceren
Also, this was the only line of code that worked on Databricks when I was trying to display dicom files with matplotlib. Thanks!
alphazwest
I've really struggled to discern when/how to show, customize, and pass-around
pyplot objects and this simple insight helped me tremendously. Go figure...