Multiplot graph axis link help needed
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Exploration についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!