Changing xlim with plotyy
9 ビュー (過去 30 日間)
古いコメントを表示
I'm trying to figure out how to adjust the x axis limits for both y plots. The function:
[AX,H1,H2] = plotyy(pitch,Torque,pitch,RPM)
I understand using xlim([min max]), but that only applies to the first x axis and not the second. Are there any functions or methods to accomplish this?
0 件のコメント
採用された回答
Walter Roberson
2012 年 12 月 5 日
編集済み: Walter Roberson
2016 年 10 月 27 日
xlim(AX(2), [min max])
3 件のコメント
William Gracias
2016 年 10 月 27 日
編集済み: William Gracias
2016 年 10 月 27 日
This solution doesn't work on Matlab 2015b. Is there any solution to change X axis limits using plotyy in 2015b?
Walter Roberson
2016 年 10 月 27 日
Example:
x1 = linspace(1,10,20); x2 = linspace(3,8,20); y1 = x1.^3 - 5*x1 + 3; y2 = log(x2);
[AX, H1, H2] = plotyy(x1, y1, x2, y2);
xlim(AX(2), [4 7]);
Tested in R2015b specifically.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Two y-axis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!