[Matplotlib-users] Interaction of matplotlib with ipython (not notebook)

Juan fiolj at yahoo.com
Tue Jul 30 11:01:16 EDT 2019


Hi Neal, I also use ipython from emacs, but the experience is highly
dependent on configuration. I am not sure I am understanding your question:

Are you talking about plt.ion(), plt.ioff() ?

plt.ion() is for interactive use
plt.ioff() for non-interactive. I use it to save the figures without
showing in the screen

Regards,
	Juan

El 30/7/19 a las 11:49, Neal Becker escribi??:
> I'm using ipython under emacs python (M-x run-python)
> 
> ipython arranges that plt.show() does nothing (does not pause).
> Sometimes I want that, but sometimes I don't (e.g., my program is going to 
> generate an infinite number of plots).
> 
> How can I stop ipython from disabling plt.show() from pausing?
> 
> On a related note, I may want to save the figure output rather than drawing 
> to the screen.  When run under ipython, figures are drawn to the screen as 
> well as saved if savefig is used, or, same problem with
> 
> from mplcairo.multipage import MultiPage
> 
>     cm = MultiPage('best_circles_after.pdf')
>     with cm as pdf:
>      .... 
> 
> anyone know how to prevent from drawing to the screen in this case?
> 
> Thanks,
> Neal
> 
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-users
> 


More information about the Matplotlib-users mailing list