Can I make a scatterplot with custom marker symbols?
古いコメントを表示
MATLAB has a range of default symbols to use as point markers on a scatterplot (circle, asterisk, point, etc.). But is there any way of replacing these with a custom symbol? Specifically, I would like to give each point a thumbnail image representing the identity of that point. Is that possible?
採用された回答
その他の回答 (1 件)
Oleg Komarov
2012 年 3 月 21 日
To show a practical example using Thomas' link in the comments:
% Sample scattergroup
load discrim
h = gscatter(ratings(:,1),ratings(:,2),group,'br','xo');
hold on
% Define the font and desired character (smiley)
font = 'Wingdings';
m = 'J';
% Use text to plot the character
x = get(h(2),'Xdata');
y = get(h(2),'Ydata');
text(x,y,m,'fontname',font,'HorizontalAl','center','color','r')
% Delete old markers
delete(h(2))
カテゴリ
ヘルプ センター および File Exchange で Discrete Data Plots についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!