(mpl 0.98.5 OO embedded in wx)
Hi, I'm trying to highlight a picked datapoint, such as is shown in
this thread:
http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg05580.html
As John suggested there, I get the index of the picked point, and then
plot a marker on that point. I am using the OO mpl form, so then
I call, to draw this new point on the canvas:
self.canvas.draw()
(self.canvas is a figure.canvas object).
But when I do this it *rescales the plot*, which I don't want. In this thread:
http://www.nabble.com/Re%3A-Plotting-single-marker-point-at-zoomed-level-p17511209.html
I found someone mentioning this concern. He said:
Thanks for that, the canvas.draw() function redraws the graph.
I had to add the "autoscale_on=False" to the add_subplot()
to stop the graph from autoscaling.
I tried this, and it did stop autoscaling--but I do want y autoscaling.
What I want is y autoscaling but not y autoscaling (just setting xlims).
I tried adding either of these lines right before or right after when I plotted
the highlighted point:
self.subplot.set_autoscale_on(False)
self.subplot.autoscale_view(tight=False, scalex=False, scaley=True)
and it didn't help--the plot rescaled, both x and y.
Any ideas what I'm doing wrong?
Thanks,
Che