フィルターのクリア

Display coordinates on the best location

3 ビュー (過去 30 日間)
Yen Tien Yap
Yen Tien Yap 2022 年 4 月 11 日
回答済み: Star Strider 2022 年 4 月 11 日
May I know how do I display the coordinates on the left of the graph so that the values will not be cut off? Thank you.
  1 件のコメント
KuriGohan
KuriGohan 2022 年 4 月 11 日
Maybe if you try
plot(x,y)
txt = [num2str(val1), num2str(val2)];
text(x_coordinate, y_coordinate);
val1 and val 2 would be 0,02715 and 555.6 in this case and x_coordinate and y_coordinate where you want the text to start

サインインしてコメントする。

回答 (1 件)

Star Strider
Star Strider 2022 年 4 月 11 日
The desirred result is not obvious.
If I understand correctly what you want to do, there are two options:
  1. Use the xlim function to extend the x-axis limits, perhaps: xlim([0 0.04])
  2. Use name-value pairs in the text call, specifically 'HorizontalAlignment','right' to have it displayed to the right of the point instead of to the left of it (the default position).
.

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by