Richard Harvey Chapman wrote:
Whenever I try to plot with the new wxPython, I get an error. Here are two sequences I used to test it. I upgraded to the latest matplotlib, 0.87.5 (from 0.86.2), just in case, but I received the same result. I use Numeric in matplotlib if that matters.
matplotlib wxAgg can be compiled in two ways: with the accelerator, which is faster, or without, which is slower. The downside of the accelerator is that it has to be compiled against the version of wxPython that is is used with, so you can't plug in a new wxPython with an older matplotlib and expect it to work.
This has been discussed recently on the matplotlib list (or maybe matplotlib-devel). With the new wxPython, there are now some methods for directly dumping data into a wx.Bitmap, so the wxAgg code could be written to not need the accelerator, which should help with this problem in the future. No one seems to have the time to do this right now, however. If you want to work on it, great!
So your options are:
1) Patch matplotlib wxAgg to use the new wx.Bitmap methods.
2) recompile MPL with the new wxPython
3) re-compile MPL without the accelerator enabled, and give up some performance.
4) you might be able to go in and hack the code a little to keep wxAgg from using the accelerator code, without re-building anything.
5) wait until someone else does one of those first.
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov