How to use multiple colors in figure?
Show older comments
I have a figure that I generated with SurfStat, using the following function, where struct is a mask and surf is a brain template.
[ a, cb ] = SurfStatView( struct, surf, title, background);
The code for the function is at this documentation ; it also calls this function (documentation2). My input is
SurfStatView((maskROI|maskROI2|maskROI3), surf, 'Clusters');
I am trying to make mask ROI, maskROI2, and maskROI3 red, blue, and green, with surf as light gray. Using colormap makes surf (structure: 'tri: 655360x3 int32', 'coord: 3x327684 double') 1 color and all the ROIs 1 color. The maskROIs are vectors of 1s and 0s (1x327684 each) which is why I'm struggling to make each ROI a different color. Using hold on and plotting each maskROI separately but on the same figure does not seem to work, nor does replacing surf with '~'. I also tried to assign color values to mask values but that doesn't allow for 3 different colors. Finally, I tried typing color args into the input but that returned the error message "Index in position 1 exceeds array bounds (must not exceed 1)". Any help would be greatly appreciated! 

1 Comment
Keertana Ganesan
on 31 Jan 2023
Hi there,
did you manage to fix this? I have different brain-behaviour associations that I'm trying to overlay on the same template and it keeps pulling an error
Answers (1)
Image Analyst
on 1 Jan 2022
0 votes
Looks like a third party package. Probably no one here has it and is not going to install it just to help you. I suggest you contact the software publisher.
Categories
Find more on Neuroimaging 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!