On Tue, Feb 16, 2010 at 12:37 PM, John Hunter <jdh2...@gmail.com> wrote:
> On Tue, Feb 16, 2010 at 11:14 AM, C M <cmpyt...@gmail.com> wrote:
>> 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.
>
> This isn't accurate -- calling draw will not change the view limits.
> In all likelihood what is happening is that when you add you your
> overlay markers, eg by calling "plot" the view limits are getting
> updated.  You can suppress this with
>
> ax.set_autoscale_on(False)
> ax.plot(overlay_markers)
> fig.canvas.draw()

Thank you, that's much easier than the animation option, which would
be more than I need to do.

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