From: John H. <jdh...@ac...> - 2004-12-10 21:03:56
|
>>>>> "Eric" == Eric Emsellem <ems...@ob...> writes: Eric> Hi, 1. slow plot 2. cursor issue 3. key press event ! Eric> ------- 1/ Here is the piece of code which is quite slow I Eric> think. Compared to pgplot this is a factor of more than Eric> 10. It does first draw a default plot (0,1 ?) and then Eric> overplot on it for each subplot. Eric> for this particular case I have 10 subplots. The slices are Eric> made of about 10-20 points each only (stored in a 3D array Eric> which is 48x5x20 points). I hope this answers the Eric> question. Sorry for the ''specifics''. Plots of this size should be extremely fast - you should be able to plot arrays 10 times this big with good performance. From your description "It does first draw a default plot ..and then overplot on it for each subplot." it sounds like you may have interactive mode turned on. This would kill your performance in a case like this, because the entire figure would be redrawn with the update of every single plotting command. See http://matplotlib.sourceforge.net/interactive.html and http://matplotlib.sourceforge.net/faq.html#SHOW . To definitively determine what mode you are in, run your script with > python simple_plot.py --verbose-helpful and verify that 'interactive is False'. Fernando Perez's ipython has support for running scripts from the interactive shell, turning off interactive mode for the duration of the run, and then restoring it. If this doesn't solve your problem please - post your entire script - report the output of verbose-helpful (requires matplotlib 0.64) - what is your platform, machine specs, etc? - how are you running the script (IDE, from the command prompt, etc) JDH |