Dynamically Generating a Graph in Python

HansWL HansWL at msn.com
Tue Oct 5 04:57:46 CEST 2004


John Hunter <jdhunter at ace.bsd.uchicago.edu> wrote 
> It would be interesting to know where this performance hit is coming
> from.  What happens if you set backend : TkAgg and interactive : True
> in your rc file, and then fire up a standard python shell
> 
> >>> from matplotlib.matlab import *
> >>> t = arange(0.01, 2.0, 0.01)
> >>> s = sin(2*pi*t)
> >>> figure(1)
> >>> plot(t,s)
> 
> In interactive mode, all the plotting commands are acted upon when
> they are issued, which should enable you to debug which of these
> commands, if any, causes the long delay.

I will try this later and report back.
I did not change Numerix, but edited .matplotlibrc to switch between
Numeric and numarray. TkAgg was on by default.
 
> The other thing I wonder about is, is it possible that Norton is doing
> some checks on python or some of the extension code that could be
> causing the long startup time.  Does it help to turn off the virus
> software?

No. I was aware of this and did disable NAV autoprotection while
trying to figure out what was wrong. No difference was observed. (NAV
does slows down the start up of IrfanView quite a bit after a virus
difination update a while back.)



More information about the Python-list mailing list