Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: How to draw markers on a 2-D colormap plot?
Replies: 4   Last Post: Dec 31, 2012 9:50 AM

 Messages: [ Previous | Next ]
 Md. Shahriar Karim Posts: 56 Registered: 2/2/09
How to draw markers on a 2-D colormap plot?
Posted: Dec 29, 2012 7:02 PM

Hi,

I am trying to draw markers on top of a 2D colormap plot. The meshgrid created for the 2D colormap plot will also be the locations of markers on the X-Y plane. However, not all the points from the grid will be plotted; instead, I shall plot only those points that satisfy a predefined condition. Can anybody help me in this regard?

Example:
-----------------------------------
figure(1)

I plotted the colormap plot as follows:

V1 = [ ] %length n
V2 = [ ] %length m

DATA = matrix (m, n)

[X,Y] = meshgrid(V1, V2);

surf(x,y,DATA );

set(gca,'cameraposition',[0 0 180])
colormap(jet)
--------------------------------------

Now, I would like to plot marker as follows:

plot(V1(),V2(),'o','MarkerSize',10,'MarkerFaceColor','black','MarkerEdgeColor','black')

---------------------------------------

I plot this marker and it's found behind the colormap! Is there any way to solve it?

Or, better ways to draw markers on top of a color map?