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!