フィルターのクリア

How to set x-axis labels under certain tick marks?

10 ビュー (過去 30 日間)
Tom Ruopp
Tom Ruopp 2016 年 3 月 2 日
コメント済み: Tom Ruopp 2016 年 3 月 3 日
Is there a simple way to define tick mark labels? For example I have attached a plot which I would like to change. Instead of having the default tick labels, I would like to programmatically put tick labels under the positions of 20,60,100,and 120 (and get rid of the numerical tick labels). At this point those positions would be consistent but in the future they may change.

採用された回答

Image Analyst
Image Analyst 2016 年 3 月 2 日
Try this:
ax = gca; % Get handle
ax.XTicks = [20,60,100,120]
ax.XTickLabel = {'','','',''} % Labels are null.
  2 件のコメント
Tom Ruopp
Tom Ruopp 2016 年 3 月 3 日
Thank you! The only issue is that
ax.Ticks
should be
ax.Tick
Without the 's'

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAxis Labels についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by