Linking axes or using addlistener
이전 댓글 표시
I have two x axes associated with the same y data. It looks like this:
x1 = 1:10;
x2 = 10*x1;
y = x1.^2;
subplot(211)
plot(x1,y)
ax1 = gca;
subplot(212)
plot(x2,y)
ax2 = gca;

The second set of x axes are 10 times x1. I'd like to do something like linkaxes because I want to be able to zoom in on the first subplot and have the second subplot limits update automatically. It seems simple, but I can't quite figure out how to do it. addlistener seems like it might be the ticket, but the documentation doesn't make clear how I could use it for this simple task.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Subplots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!