How to control number of minor ticks between the major ticks?

101 ビュー (過去 30 日間)
Megha
Megha 2018 年 10 月 26 日
コメント済み: Megha 2018 年 10 月 26 日
How to put desired number of minor ticks between two major ticks.
Like for a 24 hours data, I may like to indicate every 15-min data with a minor tick.
In that case I may need 3-minor ticks per 1 major ticks.
Other way round, if i need to indicate every 30-min data with a minor tick.
In that case I may need 1-minor ticks per 1 major ticks.
So how to control these number of tick marks??
Any suggestions...?

採用された回答

Jan
Jan 2018 年 10 月 26 日
You can specify the MinorTickValues:
axesH = axes;
plot(axesH, 1:10);
axesH.XAxis.MinorTick = 'on';
axesH.XAxis.MinorTickValues = 1:0.25:10;
  1 件のコメント
Megha
Megha 2018 年 10 月 26 日
Yes, thank you very much!!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGrid Lines, Tick Values, and Labels についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by