简体   繁体   中英

Labelling points in 3d scatter

I have a series of highly-dimensional points. When plotting them in 2D, I can highlight clusters in different colors/markers using:

gscatter(new_data(1,:),new_data(2,:),trainlabels,[],'<x+*sdv^o>ph.')

I would like to do the same with a 3D scatter, but understand that a gscatter3 function doesn't exist and scatter3 doesn't allow me to specify a label set...

Any thoughts?

You can use the command text (x,y,z,str) to label your points in 3D.

scatter3(pointList(1,:),pointList(2,:), pointList(2,:));
text(pointList(1,:),pointList(2,:), pointList(2,:), trainlabels[]);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM