Hello, I wrote a small WXAgg program with wxpython. I'm plotting simple datasets, right now I'm plotting an array of approx. 450 points. The graphing is very slow. What can I do to speed this up? I have python 2.4, wxpython 2.4, and this is what I'm using for matplotlib 'matplotlib-0.80.win32-py2.4.exe'. Thanks. Jeff
On Thursday 30 June 2005 11:15 am, Jeff Peery wrote: > Hello, > > I wrote a small WXAgg program with wxpython. I'm plotting simple > datasets, right now I'm plotting an array of approx. 450 points. The > graphing is very slow. What can I do to speed this up? I have python > 2.4, wxpython 2.4, and this is what I'm using for matplotlib > 'matplotlib-0.80.win32-py2.4.exe'. Have you checked the list archives? There has been some discussion about speed traps that you can take steps to avoid. For example, are you running a script with interactive mode on? That can cause a big performance hit. Also, if you provide a brief example script, along with any relevant changes you have made to matplotlibrc, and some detail about how long it takes to plot (maybe some profiling?), we might be able to provide some more useful suggestions. -- Darren
>>>>> "Darren" =3D=3D Darren Dale <dd...@co...> writes: Darren> Also, if you provide a brief example script, along with Darren> any relevant changes you have made to matplotlibrc, and Darren> some detail about how long it takes to plot (maybe some Darren> profiling?), we might be able to provide some more useful Darren> suggestions. A script is by far the most useful thing you can provide. =20 Note that there was an optimization for line marker drawing on win32 introduced in matplotlib-0.81 From the release notes: Fast markers on win32 The marker cache optimization is finally available for win32, after an agg bug was found and fixed (thanks Maxim!). Line marker plots should be considerably faster now on win32. The original optimization announcement is ay http://matplotlib.sourceforge.net/whats_new.html#0.72-line_marker_opti= mizations_in_agg See also http://matplotlib.sourceforge.net/faq.html#SLOW JDH =00
Jeff, I agree with John -- matplotlib and the wxAgg backend don't seem slow to me. For simple line drawings in 'stripchart mode', where a line is being updated as fast as possible, I regularly get ~12 plots per second with wxAgg and mpl 0.81+ on Windows. It's hard for me to consider that slow, but you weren't specific about what you were expecting. Do the examples at http://cars.uchicago.edu/~newville/Python/MPlot help? MPlot gives a wxPanel and wxFrame for simple line drawings that gives GUI-controlled customization of line color and style, etc and provides simple ways for end users to zoom in/out, print, and saving of images. The examples/test.py includes a stripchart-like plot. --Matt