slowdown when using pcolor and TkAgg; help?

In article <m3r7ifchlm.fsf@...375...>,
John Hunter
<jdhunter@...4...> wrote:

>>>>> "Perry" == Perry Greenfield
>>>>> <perry@...86...> writes:

    > My guess is that the hold mode is true (that's the
    > default). I think this means that every time you call
    > .pcolor that you are just appending another one to the
    > axes. You should either change the default hold mode or
    > call the .clear() method of the axes object before calling
    > the .pcolor method. If you don't do that it is rendering n
    > previous versions and the time it takes grows linearly.

Good catch Perry. You need


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 and canvas.plot() both seem to
    >> work. Just calling plot() doesn't. Any hints on this or
    >> pointers to documentation would be appreciated.


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 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