0

Is there any way to save the navigable window showing the graph with plt.show()?

  • When you mean by "navigable" that it should include the buttons (pan, zoom etc) from the navigation toolbar then the answer is no - these are part of the backend, not the image. – Stef Jan 05 '21 at 09:55
  • I just followed the idea to save the figure object with `pickle`, and even found this one: https://stackoverflow.com/questions/35649603/pickle-figures-from-matplotlib, but it doesn't work for me at least, sorry: `Figure.show works only for figures managed by pyplot, normally created by pyplot.figure()` – Dr. V Jan 05 '21 at 10:07
  • Does this answer your question?: https://stackoverflow.com/questions/49503869/attributeerror-while-trying-to-load-the-pickled-matplotlib-figure/54579616#54579616 – Dr. V Jan 05 '21 at 10:46

2 Answers2

0

Yes. You can use plt.savefig("graph.jpg") to save your figures.

Walid
  • 718
  • 5
  • 13
0

Try this:

savefig(fname, dpi=None, facecolor='w', edgecolor='w',
        orientation='portrait', papertype=None, format=None,
        transparent=False, bbox_inches=None, pad_inches=0.1,
        frameon=None, metadata=None)

for more info: matplotlib.org

Rozhin.Vs
  • 1
  • 1