X axis tick labels changes.

5 ビュー (過去 30 日間)
EJ_92
EJ_92 2020 年 3 月 23 日
コメント済み: EJ_92 2020 年 3 月 24 日
I am trying to plot a graph and then I want to update the x axis labels like the following:
0 50 100 150 200 250 and so on up to 1000
I have tried the below. But I cannot seem to get it to display here apart of my data and plot for your information. Can someone please help. This is really confusing me now.
y= ones(1, 20) * 0.7038;
plot(y,'-.','LineWidth',2);
hold off
x=[0:50:1000];
set(gca,'XTick', x);

採用された回答

darova
darova 2020 年 3 月 23 日
Here they are
  3 件のコメント
darova
darova 2020 年 3 月 24 日
You forgot '0'
EJ_92
EJ_92 2020 年 3 月 24 日
Ah sorry only realised this. Thanks its working now!

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by