Multiplot graph axis link help needed

1 次查看(过去 30 天)
AVP
AVP 2014-10-15
编辑: AVP 2014-10-15
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.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Exploration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by