Performance problems

Hello,

This subject caught my eye. I'm also using WXAgg as a backend and I'm
plotting approximately 500 points. I am using markers. I'm not using
antialiasing or interactive mode. My operating system is windows XP. It
takes approximately 1-3 seconds to make a simple plot.

···

-----Original Message-----
From: matplotlib-users-admin@lists.sourceforge.net
[mailto:matplotlib-users-admin@lists.sourceforge.net] On Behalf Of
matplotlib-users-request@lists.sourceforge.net
Sent: Sunday, July 10, 2005 8:34 PM
To: matplotlib-users@lists.sourceforge.net
Subject: Matplotlib-users digest, Vol 1 #695 - 4 msgs

Send Matplotlib-users mailing list submissions to
  matplotlib-users@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
  https://lists.sourceforge.net/lists/listinfo/matplotlib-users
or, via email, send a message with subject or body 'help' to
  matplotlib-users-request@lists.sourceforge.net

You can reach the person managing the list at
  matplotlib-users-admin@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Matplotlib-users digest..."

Today's Topics:

   1. performance problems (Donour Sizemore)
   2. Re: performance problems (John Hunter)
   3. Re: 0.83 iPython problem (John Hunter)
   4. Trellis-style plots (John Pitney)

--__--__--

Message: 1
To: matplotlib-users@lists.sourceforge.net
From: Donour Sizemore <donour@...676...>
Date: Sun, 10 Jul 2005 00:58:26 -0500
Subject: [Matplotlib-users] performance problems

I'm having pretty serious performance problems using the wxpython
backend. On linux, it takes about 1-2 seconds to render a small
window with 1000 data points. On my mac laptop, it takes about three
times as long.

I've verified that interactive mode is off, antialiasing is disabled,
and the machine is otherwise idle. I'm using:

matplotlib 0.82
wxwindows 2.6.0.0
numeric 23.8

Profiling shows that all the time is being sucked into a couple
of axis drawing functions by way of OnPaint.

Any idea why it's so slow?

thanks

donour

Donour Sizemore donour@...677...|
Technical Programmer & Numerical Analyst |
Economics Research Center Ph: 773-834-4399 |
University of Chicago Office: Walker 303-a |

--__--__--

Message: 2
To: Donour Sizemore <donour@...676...>
Cc: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] performance problems
From: John Hunter <jdhunter@...4...>
Date: Sun, 10 Jul 2005 08:47:20 -0500

    > I'm having pretty serious performance problems using the
    > wxpython backend. On linux, it takes about 1-2 seconds to
    > render a small window with 1000 data points. On my mac
    > laptop, it takes about three times as long.

    > I've verified that interactive mode is off, antialiasing
    > is disabled, and the machine is otherwise idle. I'm using:

    > matplotlib 0.82 wxwindows 2.6.0.0 numeric 23.8

    > Profiling shows that all the time is being sucked into a
    > couple of axis drawing functions by way of OnPaint.

    > Any idea why it's so slow?

Can you post a complete script that is slow for you? If it is a
marker plot and you are using 'backend : WX', it is likely to be pretty
slow because of a problem with marker drawing that was fixed for the
*Agg backends.

Also, are you using wx or wxagg? The WXAgg backend is likely faster
and certainly will produce better output with more features.

After you come up with your test script, please run it with
--verbose-helpful and post the script and the output.

Thanks,
JDH

--__--__--

Message: 3
To: Ryan Krauss <ryanfedora@...614...>
Cc: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] 0.83 iPython problem
From: John Hunter <jdhunter@...4...>
Date: Sun, 10 Jul 2005 08:50:28 -0500

    > I just updated to 0.83 and I am now having a problem with
    > Ipython. Running the following code as a script produces
    > the error message below. I am running Python 2.3.5 on
    > Windows XP with Ipython 0.6.15. I get the same message
    > regardless of whether or not I set ion().

    > How do I fix this?

Update from matplotlib CVS -- this bug was reported on Friday in the
thread "ipython and matplotlib-0.83" and will be included in a bug-fix
release next week.

http://sourceforge.net/mailarchive/message.php?msg_id=12305161

JDH

--__--__--

Message: 4
Date: Sun, 10 Jul 2005 21:41:02 -0500
From: John Pitney <john@...678...>
To: matplotlib-users@lists.sourceforge.net
Subject: [Matplotlib-users] Trellis-style plots

Hi,

I'm a new user of matplotlib, and I'm trying to learn how to do some of
the things I'm accustomed to doing in the R environment with matplotlib
and numarray. I find R's Lattice implentation of Trellis graphics very
useful in my industrial data analysis work.

For those unfamiliar with Trellis, here's the user manual:
http://www.stat.purdue.edu/~wsc/papers/trellis.user.pdf

Does anyone have any experience with making conditioned plots or
scatterplot matrices with matplotlib? I'd like to try them out with
matplotlib and would appreciate seeing any code that's already out
there.

Thanks to the matplotlib developers for what looks like a great tool!

Best regards,
John

--__--__--

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

End of Matplotlib-users Digest

Jeff, Donour,

Hm, this seems like it's a recurring complaint, but WXAgg and
wxPython are plenty fast for me. I routinely get better than 10
plots per second with ~500 data points on WinXP / WXAgg, and can
plot 25000 point arrays in under 0.5 second with any symbol or
line type.

Actually, that's with my own wrapper around matplotlib/wxPython,
so raw matplotlib may go even faster. Example code is included
as 'examples/test.py' in MPlot at
   http://cars.uchicago.edu/~newville/Python/MPlot

If you're having performance trouble, please post code next
time, and/or try the test.py from MPlot and report drawing
times. Also, make sure you know what you're timing and don't
include the creation of the data or the creation of the wx
Window that contains the plot frame.

Cheers,

--Matt