Can I make a scatterplot with custom marker symbols?
Mostrar comentarios más antiguos
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?
Respuesta aceptada
Más respuestas (1)
Oleg Komarov
el 21 de Mzo. de 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))
Categorías
Más información sobre Discrete Data Plots en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!