Member_2_2394978
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
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
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Actually, lines 7 and 10 can be simpler:
[x1 y1]=find(b==1);
ASKER
Brilliant, thanks very much.
ASKER