gramm icon indicating copy to clipboard operation
gramm copied to clipboard

color part of the background

Open danielemarinazzo opened this issue 4 years ago • 0 comments

Hi

is there a way to color part of the background, using the equivalent of area or patch?

e.g.

figure;scatter(rand(100,1),rand(100,1))
vert = [0 0;1 1;0 1]; % x and y vertex coordinates
patch('Faces',fac,'Vertices',vert,'FaceAlpha',.5,'FaceColor','g');
vert = [0 0;1 1;1 0]; % x and y vertex coordinates
patch('Faces',fac,'Vertices',vert,'FaceAlpha',.5,'FaceColor','r');

thanks!

danielemarinazzo avatar Dec 09 '20 15:12 danielemarinazzo