Same interval y axis
3 ビュー (過去 30 日間)
古いコメントを表示
Hi, I have, in for cycle, n plot and I want the same interval on y axis (0.002 mm) for all plot. The data are all different each other, so 1)there is a method to thi s this process automatically?? 2) I would like to fix the limit between min and max value to 2 cm
What I have
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/405785/image.png)
What I want
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/405790/image.png)
0 件のコメント
回答 (1 件)
Walter Roberson
2020 年 11 月 7 日
There is a way.
set(groot, 'DefaultAxesYLim', [-0.3955,-0.3935])
Better would probably be to use the handle of your figure instead of groot.
Personally I avoid setting default properties such as these, as it mentally removes the setting of the properties too far away from the code doing the plotting, making it difficult to debug. Typically it would be better to create a function that you explicitly call that sets the properties to make it obvious.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!