Suggestions for improving speed of matplotlib

John Hunter wrote:

    >> But there are plenty of opportunities for optimization in
    >> matplotlib and the way it is used, so code snippets and
    >> profiler results will be most helpful.

    > I spent a bit of time earlier today looking over the code to
    > plot_day_summary(). My hunch at the time was that creating
    > three Line2D objects per data point was a source of overhead,
    > so I put together a script to profile things. The results
    > I've gathered are rather inconclusive to me, but they may
    > help others formulate an opinion.

    > The script and results are at
    > http://agni.phys.iit.edu/~kmcivor/plot_day/

    > Vinj, you said you were using a derivation of
    > plot_day_summary() to plot charts of size 1000x700. I have
    > no idea what you mean about the chart size. Having access to
    > your plotting function and an example data set would allow me
    > to write a more accurate profiling script.

Well, yes, if you are using plot_day_summary you are dead in the
water. I specifically wrote plot_day_summary2 using line collections
for Vinj to solve the performance problems that creating so many line
instances causes. In fact, it was a request by Vinj that led to the
creation of LineCollections in the first place. Are you not using
them? :frowning:

See also examples/line_collections.py in CVS and
http://matplotlib.sourceforge.net/matplotlib.collections.html

JDH

···

Ken

    > ------------------------------------------------------- This
    > SF.Net email is sponsored by Oracle Space Sweepstakes Want to
    > be the first software developer in space? Enter now for the
    > Oracle Space Sweepstakes!
    > http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
    > _______________________________________________
    > Matplotlib-users mailing list
    > Matplotlib-users@lists.sourceforge.net
    > matplotlib-users List Signup and Options

No, I am not using them, but I haven't been doing any plots like that myself. I was hoping to be helpful, but that appears to have backfired. Serves me right for not searching the list and reading finance.py more closely. :-/

Ken

···

On May 10, 2005, at 4:03 PM, John Hunter wrote:

Well, yes, if you are using plot_day_summary you are dead in the
water. I specifically wrote plot_day_summary2 using line collections
for Vinj to solve the performance problems that creating so many line
instances causes. In fact, it was a request by Vinj that led to the
creation of LineCollections in the first place. Are you not using
them? :frowning: