Can I make a scatterplot with custom marker symbols?
Afficher commentaires plus anciens
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?
Réponse acceptée
Plus de réponses (1)
Oleg Komarov
le 21 Mar 2012
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))
Catégories
En savoir plus sur Discrete Data Plots dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!