I'm trying to find the quickest way to erase a rectangular area of 
the figure canvas.  I tried using canvas.restore_region with the 
optional bbox argument, but there seems to be some mismatch between 
the measurement units of the saved buffer object and the currently 
shown data.  For instance, if I have a Text object on my plot, I tried 
this:

bbox = g.text.get_window_extent()
canvas.restore_region(background, bbox)

. . . but it does not correctly block out the text.  (The restored 
rectangle from the background appears elsewhere on the axes.)  How can 
I convert the buffer coordinates to the coordinates of the the 
displayed plot?

        I also tried creating a patch with the same bounds as the text bbox 
and adding it to the axes, but this seems to have no effect.  Do I 
have to do something besides ax.draw_artist(mypatch) to get it to draw?

        This is part of the same thing I posted about a few days ago with 
trying to do an animation with many moving parts.  Are there any 
examples of animations which do not involve restoring the entire 
background with each draw, but rather individually erasing individual 
elements in the plot and redrawing them elsewhere?  That's what I'm 
trying to do here.

Thanks,
-- 
Brendan Barnwell
"Do not follow where the path may lead.  Go, instead, where there is 
no path, and leave a trail."
    --author unknown

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to