필터 지우기
필터 지우기

How can I increase x-axis ticks by 5 while the limit is auto?

조회 수: 1 (최근 30일)
Mohammed Alhamdan
Mohammed Alhamdan 2022년 12월 28일
답변: dpb 2022년 12월 28일
How can I increase x-axis ticks by 5 while the limit is auto?
xticks(0:5:100)
this for example will increase it by 5 but I have to specify the limit

채택된 답변

dpb
dpb 2022년 12월 28일
Don't remember otomh whether it will affect the auto-range setting or not, but to solve the above issue about range, use something like
xlm=xlim; % retrieve current x limits
xticks(0:5:xlm(end)) % set by 5 over that range
You can be more clever about lower limit and rounding, etc., etc., depending on need and characteristics of the actual data.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Animation에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by