Aman Thakral, on 2011-02-09 15:40, wrote:
I was just wondering, how would I go about redrawing only a single element
(i.e. an artist)? I know that matplotlib.artist.Artist has a draw() method
that accepts a renderer as the argument.
I tried something along the lines of:
renderer = fig.canvas.get_renderer()
title = ax.set_title("This is my title")
But have not had any luck. I'm not sure what I'm missing. Any help would
be greatly appreciated.
To see the affects of rendering something new, you can use:
If you intend to change the title several times, however, the
above will just keep over-plotting on top of the previous titles.
In that case, you'll want to use the animated=True keyword and
canvas.restore_region along with the blitting -- see the
animation examples for how to do that.
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7