[IPython-dev] nbagg problems in ipython 3.0.1 and 2.4

George Nurser gnurser at gmail.com
Wed Mar 4 18:14:28 EST 2015


Thanks Eric. That makes sense.
George

On 4 March 2015 at 19:53, Eric Firing <efiring at hawaii.edu> wrote:

> George,
>
> The problem is that clicking the red X is closing the figure, and the
> call in the next cell is trying to plot to that closed figure.  The
> solution is to open a new figure in each cell where you want to plot to
> a new figure. You can use plt.figure(), or use "fig, ax =
> plt.subplots()" and then "ax.plot(...)" etc.
>
> Eric
>
> On 2015/03/04 12:29 AM, George Nurser wrote:
> > Hi,
> >
> > Not sure whether this is an python or matplotlib query.
> >
> > Using the latest python v3.0.1 and matplotlib 1.4.3 from macports on OS
> > X 10.9.5, python 2.7.9,
> > I invoke ipython with
> >
> > ipython notebook
> >
> > Then in a new 'Jupyter' notebook I create on  Safari 7.1.3 I do
> >
> > %matplotlib nbagg
> >
> > import matplotlib.pyplot as plt
> >
> > plt.plot([1,2])
> >
> > -- this works great, but if I click on the red x to the top right then
> >
> > (i) I get the warning message on the console of
> > [IPKernelApp] ERROR | No such comm: 42451f0dd4314048908b43c2e4c414bf
> >
> > (ii) all future calls to matplotlib don't actually plot anything. e.g.
> > (both in the original cell and in new cells below in the notebook) doing
> > plt.plot([1,2]) just gives
> >
> > Out[5]:  [<matplotlib.lines.Line2D at 0x1104fa9d0>]
> >
> > I can get things to work again with another call of
> > %matplotlib nbagg
> > but just wondered whether it was supposed to work like this.
> >
> > I had similar issues with python 2.4 and matplotlib 1.4.2
> >
> > Regards, George Nurser.
> >
> >
> >
> >
> > _______________________________________________
> > IPython-dev mailing list
> > IPython-dev at scipy.org
> > http://mail.scipy.org/mailman/listinfo/ipython-dev
> >
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20150304/ba21f4be/attachment.html>


More information about the IPython-dev mailing list