フィルターのクリア

name a single point in a scatterplot

1 回表示 (過去 30 日間)
niclo
niclo 2012 年 3 月 7 日
Hi, can anyone tell me how to name a single point in a scatterplot? I want to add name on the top of every dot to show that each dot represent different model. My data is a 2-d data. Thank you.

採用された回答

Walter Roberson
Walter Roberson 2012 年 3 月 7 日
text() the string at the position of the point.
Your plot would probably be less crowded if you were to use different dot colors for the different models.
You may wish to consider using datacursormode() to allow the user to select a point and have the model name show up.
  5 件のコメント
Walter Roberson
Walter Roberson 2012 年 3 月 7 日
names = {'a' 'e' 'f' 's' 'g' 'j' 'd' 'e' 'a' 'f' 'h'};
for K = 1 : length(x)
text(x(K), y(K), names{K});
end
niclo
niclo 2012 年 3 月 7 日
Thanks a lot.This is exactly what I need. Really appreciate your help.

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by