(mpl 0.98.5 OO embedded in wx)
Hi, I'm trying to highlight a picked datapoint, such as is shown in
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 is a figure.canvas object).
But when I do this it *rescales the plot*, which I don't want. In this thread:
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.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?