How can I change the color of an alphaShape object when using plot?
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Leonard
am 27 Jan. 2015
Kommentiert: 俊鹏 陈
am 21 Jun. 2022
I have a 3-D object which I've converted to a very nice looking alphaShape object after getting the PixelIdxList and using ind2sub to get the coordinate of each voxel.
As awesome as they look, I really really need to change the color of some of the objects to anything other than the default green. Any idea on how to change the color?
0 Kommentare
Akzeptierte Antwort
Sean de Wolski
am 27 Jan. 2015
You can grab the handle to the patch objects making up the alpha shape as the output from plot and then change whatever properties of it you want:
data = randn(100,3);
as = alphaShape(data);
h = plot(as);
h.FaceColor = 'b';
1 Kommentar
俊鹏 陈
am 21 Jun. 2022
I'm sorry to bother you!
What if you wanted my graphics to have a regular gradient of color, like a rainbow. Rather than a single color.It could be like this picture, or even more beautiful.
Looking forward to your reply.
Weitere Antworten (1)
Image Analyst
am 27 Jan. 2015
Not sure what you're doing, but a huge number of MATLAB graphics functions have a 'Color' input parameter. Check for that.
Siehe auch
Kategorien
Mehr zu Bounding Regions finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!