Unique labelling of elements in scatter plot
Info
This question is closed. Reopen it to edit or answer.
Show older comments
Hi, I am trying to make a scatter plot with multiple groups 'forVisit' and ''. What if i want to highlight each 'X' and '0' based on the elements in first column of 'read_time_series_data'? Any help to solve this will be appreciated.
x = read_time_series_data.nestType;
y = (read_time_series_data.time)./60;
group = {read_time_series_data.forVisit,read_time_series_data.forRecruitment};
gscatter(x,y,group,'rkgb','o*',15,'on','Nest quality(lux)','time(minutes)');
set(gca,'xtick',[1,16]);

5 Comments
Image Analyst
on 18 Nov 2018
What does "highlight" mean to you? I can see both black asterisks and red circles in your data so it seems to be doing it correctly.
If you want, you can use plot to overlay the circles with a thicker line width by setting the 'LineWidth' property to 2 or 3.
Hari krishnan
on 18 Nov 2018
Image Analyst
on 18 Nov 2018
Again, What does "highlight" mean to you?
You cannot have the groups be unique unless every marker is in its own group. If that's what you want, use scatter() instead of gscatter() and you can probably make each marker unique (at least its color unique).
Hari krishnan
on 19 Nov 2018
Hari krishnan
on 19 Nov 2018
Answers (0)
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!