[IPython-dev] A request for help reviewing/testing a branch

Fernando Perez fperez.net@gmail....
Sun Jan 10 00:05:28 CST 2010


2010/1/9 John Hunter <jdh2358@gmail.com>:
>
> I was also able to test this with the default ubuntu 9.10 mpl and it
> worked fine.  Backend switching does not appear to work with "%pylab
> qt" and then "%pylab wx" or "%pylab tk" but I had read in a previous
> thread that there should be some limited support for backend
> switching....  What is the status here?

This particular ball is on your court:

http://sourceforge.net/mailarchive/forum.php?thread_name=db6b5ecc0912302040i2580ddf1g454c8eeaa017b50d%40mail.gmail.com&forum_name=matplotlib-devel

Basically, just comment out in backends/__init__.py:use() this:

   if 'matplotlib.backends' in sys.modules:
       if warn: warnings.warn(_use_error_msg)
       return

And uncomment in IPython/core/pylabtools.py these two lines:

    # XXX For now leave this commented out, but depending on discussions with
    # mpl-dev, we may be able to allow interactive switching...
    #import matplotlib.pyplot
    #matplotlib.pyplot.switch_backend(backend)

Then, you should be able to switch backends.  We'll need to experiment
to figure out which ones work and which don't, and eventually we may
leave some of this available to end users.

Let me know how it goes, in my experience, qt4/wx seem to switch OK,
tk and gtk lock up.

Cheers,

f


More information about the IPython-dev mailing list