Link to home
Create AccountLog in
Avatar of Member_2_2394978
Member_2_2394978Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Overlay on pcolor

Hi all,

I have pcolor plotting a matrix, however I would like to overlay another matrix on top.
The matrix I want to overlap consists of only 0, 1 and 2s. For each cell in the pcolor plot, there is a corresponding value in the overlapping matrix. In each cell I want to plot a little green circle for 1s lets say and a little red circle for 2s, and nothing for 0s. The circle needs to be in the centre of the cell, and small, so the colour of the original cell can still be seen.
Hope that makes sense.

Any suggestions? I can draw circles, although mainly finding the centre of each cell, so if the figure is different sizes etc.!

Thanks
James
ASKER CERTIFIED SOLUTION
Avatar of yuk99
yuk99
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Member_2_2394978

ASKER

Thanks, I shall give this a go tomorrow :)
Actually, lines 7 and 10 can be simpler:
[x1 y1]=find(b==1);

Open in new window

Brilliant, thanks very much.