X axis tick labels changes.

2 vues (au cours des 30 derniers jours)
EJ_92
EJ_92 le 23 Mar 2020
Commenté : EJ_92 le 24 Mar 2020
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);

Réponse acceptée

darova
darova le 23 Mar 2020
Here they are
  3 commentaires
darova
darova le 24 Mar 2020
You forgot '0'
EJ_92
EJ_92 le 24 Mar 2020
Ah sorry only realised this. Thanks its working now!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by