Selective colouring of points in a matlab surface plot

I have to visualize results form a an algorithm, for this, i am using a surface plot (surf function). what i need is specific points which fulfil a certain criteria in a different colour, but preserving the other points and their colours the way they already are.
My surfaceplot in 2D looks like this - https://dl.dropbox.com/u/47825023/untitled.png
and after the algorithm it looks like this - https://dl.dropbox.com/u/47825023/output.png
is there any way to color the selected points?

Answers (1)

That depends on the character of "certain criteria", CC.
If CC depends only on Z it is possible with
... 'CDataMapping','direct' ...
in combination with a dedicated color map. See: How to create a graph
If CC depends on x and y I guess the best way is to add graphic objects on top of the surface, e.g. line objects with "LineStyle , 'none'" and an appropriate "Marker".

Categories

Products

Asked:

on 1 Dec 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!