Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » Software » comp.soft-sys.matlab

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   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
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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 );

shading interp
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?

Thanks in advance,

Shahriar



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.