필터 지우기
필터 지우기

How to a create a label at the bottom of a vertical line?

조회 수: 32 (최근 30일)
Allen Hammack
Allen Hammack 2024년 3월 15일
댓글: Allen Hammack 2024년 3월 15일
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)?

채택된 답변

Alan Stevens
Alan Stevens 2024년 3월 15일
Like this?
x = linspace(0,6,100);
y = exp(x);
plot(x,y)
xline(4.5,'-',{'Acceptable','Limit'}, 'LabelVerticalAlignment', 'bottom');
  댓글 수: 1
Allen Hammack
Allen Hammack 2024년 3월 15일
Yes, that's exactly what I needed! Thank you!
(If only I had read the documentation a bit more closely.)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by