Add name above a horizontal (threshold) line on a graph plot matlab

Hello everyone!
How can I add the name above a horizontal (threshold) line on a graph plot? (I don't want to put the name of the line in the legend, but above it).
I am using matlab 2014a version.
Thank you very much!

 채택된 답변

x=[0 10];
y=[2 2];
plot(x,y)
%adjust x, y coordinates and the text as you like
text(0.5, 2.05, 'Text')

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Line Plots에 대해 자세히 알아보기

태그

질문:

2023년 1월 19일

댓글:

2023년 1월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by