I have a mpl graph embedded in wxPython, and I call a function,
customize_plot() to do a number of things to the plot:  adjust the
spacing around it, set the formatters, fontsizes, axis limits, set a
grid, etc.

Now I want to potentially highlight points (by adding semi-transparent
points on top of existing ones) or annotate points with user
interaction.  If I do that, it seems I need to call canvas.draw().
But when I do that, it redraws the whole canvas and ignores some of
the formatting I laid out in customize_plot(), specifically the view
limits, and that's not acceptable.

I want it to simply add the new points without changing any of the
features of the plot.  Is there a way to do that?  In Googling for
hints, I found this point from JDH from almost two years ago, which I
think is applicable to my need:

> If you call fig.canvas.draw, everything will be updated.  If you want
> to selectively draw certain artists, you can use the animated property
> w/ background copy/restore and the draw_artist method as described at

> http://www.scipy.org/Cookbook/Matplotlib/Animations

Is this still the case in the current version of matplotlib?  Or is
there a newer way to do it now?

Thank you for any suggestions,
Che

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