From: Jon Shultz on 3 Sep 2009 14:41 "Paul Mennen" <nospam(a)mennen.org> wrote in message <h7ap9k$bp6$1(a)fred.mathworks.com>... > "Jon Shultz" wrote > > Since plotyy places the two axes directly on top of eachother, the zoom feature from the figure toolbar will only allow you to zoom the data plotted second. Is there a way to interactively zoom axis 1 without using the property inspector? I want to zoom the data independently, so linkaxes or linkprop aren't helpful. > > I think you will find that "plt.m" (an alternative to plotyy, available from the FileEx) is much better at interactive zooming and panning, and more flexible regarding the axis linking question as well. To see what I mean, try the "demo\plt5.m" example which plots 5 traces (4 on the left axis and one on the right axis). Now click the mouse anywhere in the plot area (but not on a line) and hold the button down and drag. This pans the display. Note that the left and right axes are linked. Next click on the right hand y-axis label. (Note the appearance change). Then when you pan, note that the axes are now unlinked. There are ways to pan either axes independently even when they are linked. Zooming has similar flexibility. To get all the details on the topic, type "plt help" at the command window, go to the second section "Using the plt window" and then to the 3rd topic "panning and zooming" > and you will find all the panning and zooming methods clearly explained. If for some reason you don't find it so clear, just ask the author of plt.m ... which happens to be me :) > > ~Paul Mennen > paul (at) mennen (dot) org Thanks, Paul. I found that I can change select the axis on top (yaxislocation = right) by: a=findobj(gcf,'type',axes','yaxislocation','right'); ....and then change the handlevisibility. set(a,'handlevisibility,'off'); Then I can use the zoom button on the figure toolbar to zoom the left-yaxis plot.
|
Pages: 1 Prev: How to add transparency to colorbar? Next: Delay between two signals |