You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In IPython environment, When I make plot using plt.show(block=False), the plot won't show at all. And after the script is finished, if I press CTRL+D (to exit), then the plot will show up.
Matplotlib version, Python version and Platform (Windows, OSX, Linux ...)
Matplotlib 1.5.1, Python 3.5.2, IPython 5.1.0, Ubuntu
How did you install Matplotlib and Python (pip, anaconda, from source ...)
Miniconda
If possible please supply a Short, Self Contained, Correct, Example
that demonstrates the issue i.e a small piece of code which reproduces the issue
and can be run with out any other (or as few as possible) external dependencies.
If this is an image generation bug attach a screenshot demonstrating the issue.
If this is a regression (Used to work in an earlier version of Matplotlib), please
note where it used to work.
It used to work well but I don't remember which version it was.
Activity
jenshnielsen commentedon Aug 26, 2016
The best way to run maplotlib in IPython is via the enventloop integration activated with '%matplotlib' in which case you don't need show at all.
wenzao commentedon Aug 26, 2016
Could you elaborate? How do "activate %matplotlib"?
wenzao commentedon Aug 26, 2016
OK I think I activated it just by typing the command in the IPython terminal. But is there a way to include the activation into a python script?
tacaswell commentedon Aug 27, 2016
This will happen automatically when in the IPython shell going forward via #6734.
That PR also shows you how to set up the event loop in a script.