|
From: matthew a. <ma...@ca...> - 2004-11-09 02:35:25
|
Thanks for matplotlib 0.64. Great to see steady improvements continue to
roll in.
First the good news. IPython (0.6.4) using pylab works for me again. It
broke with 0.63 / 0.6.3 and gtk 2.4.x, complaining about gtk mainloop
and gtk main in the middle of the IPython prompt and then freezing up.
I had some minor issues with my GTK matplotlib API code.
1. I had to change
toolbar = NavigationToolbar(canvas)
to
toolbar = NavigationToolbar(canvas, win)
where win is the GTK window object. I guess the matplotlib API is still
unstable. :)
2. I was getting errors that the
matplotlib.backends.backend_mod.IMAGE_FORMAT attribute was not found,
during toolbar initialization. I put in a workaround.
works with matplotlib 0.63:
import matplotlib
matplotlib.use('GTK')
from matplotlib.backends.backend_gtk import FigureCanvasGTK
from matplotlib.backends.backend_ps import FigureCanvasPS
from matplotlib.backends.backend_gtk import NavigationToolbar2GTK as
NavigationToolbar
using matplotlib 0.64:
import matplotlib
matplotlib.use('GTK')
from matplotlib.backends import backend_gtk
matplotlib.backends.backend_mod = backend_gtk
from matplotlib.backends.backend_gtk import FigureCanvasGTK
from matplotlib.backends.backend_ps import FigureCanvasPS
from matplotlib.backends.backend_gtk import NavigationToolbar2GTK as
NavigationToolbar
This style was cribbed from matplotlib examples and / or emails on this
list.
Cheers,
Matthew.
|