Same interval y axis

조회 수: 4 (최근 30일)
MARCO PIGNATIELLO
MARCO PIGNATIELLO 2020년 11월 7일
댓글: MARCO PIGNATIELLO 2020년 11월 9일
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
What I want

답변 (1개)

Walter Roberson
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.
  댓글 수: 1
MARCO PIGNATIELLO
MARCO PIGNATIELLO 2020년 11월 9일
I would like to set 2 cm between the top and the bottom of y axis for all the plots that instead have different y axis limits. Moreover, I want one tick each 1 mm like in the excel graph.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by