plt.show() changed behaviour?

51 views
Skip to first unread message

Matthias Geier

unread,
Feb 19, 2017, 2:59:57 PM2/19/17
to jup...@googlegroups.com
Dear list.

I just wanted to update my introductory matplotlib notebook
(http://nbviewer.jupyter.org/github/mgeier/python-audio/blob/master/plotting/matplotlib.ipynb)
for matplotlib 2.x, when I found out that apparently the behavior of
plt.show() has changed since I last consciously tried it.

Previously, calling plt.show() (without using the %matplotlib magic
before) opened a new window containing the plot, now the plot is shown
inline in the notebook.

I don't know if this change is related to Jupyter or to Matplotlib.

Can someone please point me to the documentation where this behavior
is explained?

Or probably to a pull request or something where this was discussed?

It seems strange to me that the default here seems to be "inline",
while the default for the %matplotlib magic is having a separate plot
window and "inline" mode has to be requested explicitly.

Anyway, I'd like to find out more details about this behavior in order
to properly represent it in my introductory notebook.

cheers,
Matthias

Thomas Kluyver

unread,
Feb 20, 2017, 9:09:17 AM2/20/17
to Project Jupyter
Hi Matthias,

I think there have been a handful of interacting changes in IPython and matplotlib (Jupyter is not particularly involved, as it's a kernel matter). I can't find the matplotlib changes at the moment, but here's one of the changes that was involved on the IPython side:

https://github.com/ipython/ipykernel/pull/159

Thomas


--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAFesC-e4KRW_7iFpHozNexjhxrjWV4oVkkkaSScWDg6bXu6tqA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Matthias Geier

unread,
Feb 20, 2017, 3:01:57 PM2/20/17
to jup...@googlegroups.com
Hi Thomas.

Thanks for the link, that's very helpful!
There's also a link to the corresponding matplotlib PR:
https://github.com/matplotlib/matplotlib/pull/6734

cheers,
Matthias
>> email to jupyter+u...@googlegroups.com.
>> To post to this group, send email to jup...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jupyter/CAFesC-e4KRW_7iFpHozNexjhxrjWV4oVkkkaSScWDg6bXu6tqA%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+u...@googlegroups.com.
> To post to this group, send email to jup...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/CAOvn4qhLWNGzjCK8bZ_sxSRhy5ihKHOmEr1Tj0ppusEZ6wBcqQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages