change start point of plot
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Nurul Ain Basirah Zakaria
le 16 Fév 2021
Réponse apportée : Cris LaPierre
le 3 Mar 2021
Hi how can I change the Jan to start at 0?

0 commentaires
Réponse acceptée
Cris LaPierre
le 3 Mar 2021
You can change the first point's y value from 105 to 0.
d=datetime(2020,1,1):calmonths:datetime(2020,12,1);
y = randi(160,[1,12])+100;
M = month(d,'shortname');
plot(categorical(M,M),y)
% change the first point to 0
y(1)=0;
plot(categorical(M,M),y)
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!