Multiplot graph axis link help needed

1 view (last 30 days)
AVP
AVP on 15 Oct 2014
Edited: AVP on 15 Oct 2014
Hi. I have a plot that has 5 sets of data on it. 2 are tied to the left hand Y-axis, 3 are tied to the right hand Y-axis, and all 5 are tied to the same X-axis.
Now I need to be able to zoom on the graph and have all axis change appropriately. I tried using linkaxes but I only got it to work for the X-axis because when I use it on the Y-axis it replaces one Y-axis with the other.
Does anyone know how to keep Y-axis as they are but have them both zoom in?
Here's my code:
figure_handle=figure;
hold on
ax1=gca;
line(T,LVDT,'Color','r')
line(T,SyncLock,'Color','b')
ax2 = axes('YAxisLocation','right','Color','none');
line(T,PSIGstow,'Parent',ax2,'Color','y')
line(T,PSIGdeploy,'Parent',ax2,'Color','g')
line(T,LoadCell,'Parent',ax2,'Color','c')
all_ha=findobj(figure_handle,'type','axes','tag','');
linkaxes(all_ha,'x');
Thanks for the help.

Answers (0)

Categories

Find more on Visual Exploration in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!