draw a label in the scatter graph

1 回表示 (過去 30 日間)
Lev Mihailov
Lev Mihailov 2020 年 1 月 28 日
回答済み: Cam Salzberger 2020 年 1 月 28 日
Hello! I have a scatter graph
scatter( x, y, [] , z, 's', 'filled') %
I have x and y coordinates where should the label be, how do I make it?
scatter( x, y, [] , z, 's', 'filled')
hold on
scatter( a, b, [] , c, 's', 'filled')
hold off % this option does not fit, the values ​​of 'c' are much greater than 'z'

回答 (1 件)

Cam Salzberger
Cam Salzberger 2020 年 1 月 28 日
You can use the text function to put labels at x-y coordinates. Name-value pairs can be used to determine where to place the labels relative to the coordinates (e.g. left, right, centered, etc.).
text(x, y, ["my" "labels" "etc..."])
I'm not sure what you were trying to do with a, b, and c in the above code, or if you have a separate question about that.
-Cam

カテゴリ

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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by