add text to value of a plot
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
alpedhuez
le 25 Mai 2020
Réponse apportée : Star Strider
le 25 Mai 2020
I have a plot with x axis takes the value 1, 2, 3,.... I want to add a text "day" to these values so that they will be "Day 1","Day 2", "Day 3",... I did not find a relevant post on the Internet.
0 commentaires
Réponse acceptée
Star Strider
le 25 Mai 2020
Example —
x = 1:10
y = rand(1,10);
figure
plot(x, y)
xtickformat('Day %g')
producing:
.
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!