Adding a label with text on a plot
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Akzeptierte Antwort
Chunru
am 28 Feb. 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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!