From: Russell E. O. <ro...@ce...> - 2005-03-18 19:58:25
|
In article <m3r...@pe...>, John Hunter <jdh...@ac...> wrote: > >>>>> "Perry" == Perry Greenfield > >>>>> <pe...@st...> writes: > > Perry> My guess is that the hold mode is true (that's the > Perry> default). I think this means that every time you call > Perry> .pcolor that you are just appending another one to the > Perry> axes. You should either change the default hold mode or > Perry> call the .clear() method of the axes object before calling > Perry> the .pcolor method. If you don't do that it is rendering n > Perry> previous versions and the time it takes grows linearly. > > Good catch Perry. You need > > sp.hold(False) Thank you both very much. That did the trick. I put a hold on the figure and then a hold(False) on the one axis for which I wanted it and all works well now. > >> P.S. At risk of distracting from the main problem: I am not > >> entirely sure I'm commanding a redraw in the correct > >> fashion. I'm fuzzy on the difference between show and > >> plot. Using canvas.show() and canvas.plot() both seem to > >> work. Just calling plot() doesn't. Any hints on this or > >> pointers to documentation would be appreciated. > > See http://matplotlib.sourceforge.net/faq.html#SHOW Thanks. That was helpful -- though also a bit confusing, in that I'm using the TkAgg back end and calling pylab.draw() doesn't update anything visible on my FigureCanvasAgg object. (As an aside, calling show() on my FigureCanvasAgg object seems to work -- the code originally did that when I got it -- but the manual and FAQ clearly point to using draw instead). > >> Also, is pcolor documented anywhere? >... > All the class docs can be found at > http://matplotlib.sourceforge.net/classdocs.html. In particular, That's what I was really missing. Thanks! Now that I know about it, I'm not sure how I missed it the first time. Oh well... -- Russell |