how can I specify the marker name in scatter plot

3 ビュー (過去 30 日間)
xueqi
xueqi 2013 年 6 月 19 日
Dear Felows,
Do you know is there any way that I can name the marker by myself instead using the the default ones? For example, if I am plotting vectors of 65 dimentions, how can I name each point in the plot as the number from 1 to 65? My current code is
if true
% h=scatter(pf(:,1),pf(:,2),'.') % pf is 65*2 matrix containning numbers
saveas(h,num2str(i), 'jpg')
end
Currently the markers are all '.' so I am unable to distingush them. I would like them to be from number 1 to 65 according to the rows of the matrix. For example, if the 3rd rows of pf is (25,30), I want the marker is number 3 for this point.
Thanks, Xueqi

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 6 月 19 日
set(gca,'xlabel',1:65)
  1 件のコメント
xueqi
xueqi 2013 年 6 月 19 日
編集済み: xueqi 2013 年 6 月 19 日
Hi would you be able to provide more details about this? My current code is
if true
h=scatter(pf(:,1),pf(:,2),'.') % pf is 65*2 matrix containning numbers
saveas(h,num2str(i), 'jpg')
end
Currently the markers are all '.'. But I would like them to be from number 1 to 65 according to the rows of the matrix. For example, if the 3rd rows of pf is (25,30), I want the marker is number 3 for this point.

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

カテゴリ

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