Diff limits on same axis
1 回表示 (過去 30 日間)
古いコメントを表示
Hi
I want to set two limits on my same axis i have attached the fig below, on xaxis i want limits from -50 to 225 and again from 775 to 850.
My current limits are
xlim([-50 850])
ylim([-19 140])
One can please sugget a better replacement for the one.Thanks in Advance!!
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/470212/image.png)
1 件のコメント
dpb
2020 年 12 月 24 日
Then the x axis physical location for the last point is totally arbitrary...just change its x value to (say) 400 and the label the xtick to 800 for that location.
採用された回答
Cris LaPierre
2020 年 12 月 24 日
編集済み: Cris LaPierre
2020 年 12 月 24 日
Another option is to realize that your xtick values and xticklabels do not have to be the same. You could plot against one set of xvalues, then create tick labels that display the values you want.
x = [1 3 6 55];
y = [100 85 77 44];
err = 8*ones(size(y));
errorbar(y,err,'o')
xticks(1:4)
xlim([0 5])
xticklabels(x)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Interactive Control and Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!