Is there any way to display a value instead of circles for points on a plot?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
joys roselin
am 17 Nov. 2016
Beantwortet: Walter Roberson
am 18 Nov. 2016
Is there any way to display a value instead of circles for points on a plot?
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 18 Nov. 2016
a=1:10:100;
b=sin(a);
plot(a,b);
labels = arrayfun(@(A,B) sprintf('%g:%g', A, B), a, b, 'Uniform', 0);
text(a, b, labels)
0 Kommentare
Weitere Antworten (1)
Brendan Hamm
am 17 Nov. 2016
You can use the text function.
x = rand(5,1);
y = rand(5,1);
txt = num2str((1:5)');
text(x,y,txt)
1 Kommentar
Siehe auch
Kategorien
Mehr zu Annotations 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!