フィルターのクリア

Text Not Showing On Plot

50 ビュー (過去 30 日間)
Jay
Jay 2018 年 1 月 13 日
回答済み: Jay 2018 年 1 月 14 日
I am trying to have the text show on one of my points on the plot.
When I use the command
text(x(1),y(1),'Mark 1')
The text overlaps on the point.
When I use
text(x(1)+0.5,y(1),'Mark 1')
No text is shown (even when using the "hold on" command).
If I only have one Mark (comment out the others), I have the command
text(x1,y1,'Mark 1')
and the Mark's label is offset to the right.
Why is this happening and how do I fix it?

採用された回答

Jan
Jan 2018 年 1 月 13 日
If the x axis goes from x(1)-0.1 to x(1)+0.1, the text drawn at x(1)+0.5 is outside the visible area. Does this happen in your case? If not, please post some code, which reproduces the problem you see.

その他の回答 (2 件)

Jay
Jay 2018 年 1 月 14 日
Thankyou Star and Jan,
The text was indeed outside of the window space.

カテゴリ

Help Center および File ExchangeLabels and Annotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by