Display values on plot
134 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Dear all,
How do I display values on a plot (as shown in picture) or something similar to this for multiple subplots?
Thank you.
0 commentaires
Réponse acceptée
Chunru
le 10 Déc 2021
Modifié(e) : Chunru
le 10 Déc 2021
You can use text. For example
t = 0:.01:2*pi;
x = cos(t);
plot(t, x);
text(0.2, 0.4, {'This', 'is', 'a', 'test'}, 'EdgeColor', 'r')
2 commentaires
Chunru
le 10 Déc 2021
if you have a string array
r = ["r=0.1"; "r=0.2"];
Then you can do the following:
t = 0:.01:2*pi;
x = cos(t);
plot(t, x);
text(0.2, 0.4, r, 'EdgeColor', 'r')
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Subplots 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!