Adding a label with text on a plot
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a plot of some data and I want to highlight one of its distinct peaks like this:

Is there any way that I can do this?
0 commentaires
Réponse acceptée
Chunru
le 28 Fév 2024
x = -3:.1:3
y = exp(-(x-0.5).^2/2);
plot(x, y)
% need to adjust the coordinates (normalized unit)
% doc annotation for more details
annotation("doublearrow", [0.58 0.58], [0.12 0.93]);
text(0.5, 0.4, "a", "Color", "r") % data unit
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Annotations 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!
