ipython -pylab no longer plots interactively on 0.10.1 #213

Closed
dirjud opened this Issue Dec 16, 2010 · 2 comments

Comments

Projects
None yet
2 participants
@dirjud

dirjud commented Dec 16, 2010

I am using ipython on Fedora Linux 13. They recently updated from 0.10 to 0.10.1 and interactive matplotlib plotting no longer works when using the -pylab option. I posted an issue on Fedora's bug tracker as well at https://bugzilla.redhat.com/show_bug.cgi?id=663823.

Here is how to reproduce it:

$ ipython -pylab

In [1]: import pylab

In [2]: pylab.plot([0,1],[1,0])
Out[2]: [<matplotlib.lines.Line2D object at 0x255d390>]

Historically after running this command a matplotlib plot would have popped up,
but it no longer does. So if you then run pylab.show(), it will pop up, but it
blocks and is not interactive as before. Then when you close the plot that
popped up, it continues to block. It is hung. After waiting a long time, I hit
Ctrl-C, and I get the following message:

In [3]: pylab.show()
^CERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (332, 0))


KeyboardInterrupt Traceback (most recent call last)

/home/lane/ in ()

/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_gtk.pyc in
show(mainloop)
76 if mainloop and gtk.main_level() == 0 and
77 len(Gcf.get_all_fig_managers())>0:
---> 78 gtk.main()
79
80 def new_figure_manager(num, _args, *_kwargs):

KeyboardInterrupt:

In [4]:

When I revert back to 0.10, it works as expected.

@dirjud

This comment has been minimized.

Show comment
Hide comment
@dirjud

dirjud Dec 16, 2010

I just cloned the repo, and the master branch works as expected. The 0.10.2 branch is broken the same way the 0.10.1 release is broken.

dirjud commented Dec 16, 2010

I just cloned the repo, and the master branch works as expected. The 0.10.2 branch is broken the same way the 0.10.1 release is broken.

@fperez

This comment has been minimized.

Show comment
Hide comment
@fperez

fperez Dec 17, 2010

Member

Yes, unfortunately we still have a small bug there, though it's specific to the GTKAgg backend.

If you configure matplotlib to use any of these backends:

backend      : TkAgg    # the default backend
backend      : QtAgg    # the default backend
backend      : Qt4Agg    # the default backend
backend      : WXAgg    # the default backend

by putting one of these lines in your ~/.matplotlib/matplotlibrc, it will work fine.

I hope to get some time in a few days to fix this annoyance and make a clean 0.10.2 release, sorry about the problem.

Member

fperez commented Dec 17, 2010

Yes, unfortunately we still have a small bug there, though it's specific to the GTKAgg backend.

If you configure matplotlib to use any of these backends:

backend      : TkAgg    # the default backend
backend      : QtAgg    # the default backend
backend      : Qt4Agg    # the default backend
backend      : WXAgg    # the default backend

by putting one of these lines in your ~/.matplotlib/matplotlibrc, it will work fine.

I hope to get some time in a few days to fix this annoyance and make a clean 0.10.2 release, sorry about the problem.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment