How to use multiple colors in figure?

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

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

Sign in to comment.

Answers (1)

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

Asked:

D F
on 31 Dec 2021

Commented:

on 31 Jan 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!