|
I have 3 different plots in a subplot with two different y-axes.
1. The left y-axis has a lot of data plotted with the style 'b.' (blue dots).
2. The right y-axis has a stem with a histogram with all the occurences of the left y-axis data.
3. The right y-axis also has a black line that goes through all the stem points to make it more visible.
they all share the same x-axis and have been linked with "linkaxes" with 'x' only
The left scale is about 0-250, while the right scale is about 0-140.
I've managed to plot it all very nicely so that all three plots have correct limits and are easily viewed, but the problems start when I want to zoom in the subplot. Sometimes only the left y-axis scales, sometimes only the right y-axis, depending on where in the subplot I click. It seems that there is a clickable layer on top of the data plots and when I click on the data that belongs to the right axis, it only zooms the right axis data, and vice versa for the left axis.
If i use linkaxes to link BOTH the y and x axes, the scale for the right y-axis is wrong (well it does look ok if I have enough data to make occurences reach over 100-ish, because then it's in the same order of magnitude as the left y-axis, but it could very well be much lower, and the stem+line for the histogram would be very flat at the bottom).
And really, what's the use of having two different y-axes if you link them togheter to the same max/min limits?
What I want now is some way of making the data in the plots 'un-targettable' or something, so that wherever I click in the subplot (be it click-zoom or drag-zoom) both y-axis scales are scaled with the same amount while still having different max/min limits from one another.
I hope this all makes sense. =)
|