python - Saving to disk directly with matplotlib -


i save figures disk without rendering them on screen , without having change rendering backend.

i tried instructions in here, namely avoiding calling fig.show() nor fig.draw() , calling fig.savefig, noticed mere statement fig = plt.figure() opens figure on screen.

how can save figure disk without having render it, , without having change backend?

pyplot has interactive functionality automatically call draw() after plt.* calls you.

draw not automatically called if don't go through state machine interface (ex gca().plot(...) not automatically redraw, plt.plot(...) would).

see code, important function in draw_if_interactive.

this can turn off via plt.ioff() or not calling plt.ion() (ipython --pylab automatically turns on you).

doc


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -