color for surf 3d
Show older comments
i represent a 3d surf in my code and i want color the result blue not black i use this code :
h=surf(xImage,yImage,zImage,...
'CData',rgbPic,...
'FaceColor','interp','EdgeColor','none','LineStyle','none');

Answers (1)
Geoff Hayes
on 17 Dec 2015
Samer - what happens if you just set the FaceColor property to blue as
h=surf(xImage,yImage,zImage,...
'CData',rgbPic,...
'FaceColor','blue','EdgeColor','none','LineStyle','none');
12 Comments
samer mahmoud
on 17 Dec 2015
Geoff Hayes
on 17 Dec 2015
Can you attach your data for xImage, yImage, and zImage?
samer mahmoud
on 18 Dec 2015
Edited: Geoff Hayes
on 18 Dec 2015
Geoff Hayes
on 18 Dec 2015
Okay, how about for the rgpPic?
samer mahmoud
on 19 Dec 2015
samer mahmoud
on 19 Dec 2015
Geoff Hayes
on 19 Dec 2015
Samer - can you attach the rgbPic data as a mat file? That way, someone can use it with surf to try and colour it blue.
samer mahmoud
on 19 Dec 2015
Walter Roberson
on 19 Dec 2015
If it is a grayscale or binary image, why is the variable name "rgbPic" ?
Sigh.
bluemap = [0 0 1; 0 0 0];
colormap(bluemap);
samer mahmoud
on 19 Dec 2015
Walter Roberson
on 19 Dec 2015
In your other thread where the discussion is taking place, rgbPic is not binary, but in this thread it is??
It gets really confusing for people when you are discussing two different versions of code without making clear what the difference is between the two versions.
samer mahmoud
on 20 Dec 2015
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!