Create an annotation into a plot
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Tiago Dias
am 19 Nov. 2018
Kommentiert: madhan ravi
am 19 Nov. 2018
Hello,
When i create an annotation into a plot to show me a specific value that I have previously calculated, in the plot it shows me a square, instead of the value I wanted.
This is what I got, keigenvalue is a number 6 for example.
keigenvalue = find(lambda > 1, 1, 'last'); % Gives me the number of principal components that got a eigenvalue superior than 1
y1 = plot(lambda,'*r');
dim = [0.2 0.5 0.3 0.3];
str = ['PC selected =' keigenvalue];
annotation('textbox',dim,'String',str,'FitBoxToText','on');
Thanks for your help.
0 Kommentare
Akzeptierte Antwort
madhan ravi
am 19 Nov. 2018
Bearbeitet: madhan ravi
am 19 Nov. 2018
str = ['PC selectec =' num2str(keigenvalue)]; %if it doesn't work provide all your values
2 Kommentare
Weitere Antworten (0)
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!