How to a create a label at the bottom of a vertical line?
95 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Allen Hammack
am 15 Mär. 2024
Kommentiert: Allen Hammack
am 15 Mär. 2024
I am plotting a vertical line using xline, and I'd like to label the plot at the bottom of the line instead of the top. The example at https://www.mathworks.com/help/matlab/ref/xline.html is a good example of what I am getting now:
x = linspace(0,6,100);
y = exp(x);
plot(x,y)
xline(4.5,'-',{'Acceptable','Limit'});
How can the label be moved to the bottom of the line (near the x-axis)?
0 Kommentare
Akzeptierte Antwort
Alan Stevens
am 15 Mär. 2024
Like this?
x = linspace(0,6,100);
y = exp(x);
plot(x,y)
xline(4.5,'-',{'Acceptable','Limit'}, 'LabelVerticalAlignment', 'bottom');
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing 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!