Plotting 3D points on 2D-contour plots with colors indicating z values

Plotting 3D points on 2D-contour plots with colors indicating z values

Post by mail.post2 » Sun, 29 Jun 2003 16:35:39


Dear Mathgroup,

Hello! How do I make a Contour Plot of 3D-points {x,y,z}, with different
colors indicating the height values (z) and x,y as the axes???

Thanks!
Ava.
 
 
 

Plotting 3D points on 2D-contour plots with colors indicating z values

Post by bobhanlo » Wed, 02 Jul 2003 21:49:27

f[x_,y_] := Sin[x*y/5];

xmin=-5;xmax=5;ymin=-5;ymax=5;

Plot3D[f[x,y],{x,xmin,xmax},{y,ymin,ymax},
PlotPoints->25];

nbrContours=15;
ContourPlot[f[x,y],{x,xmin,xmax},{y,ymin,ymax},
PlotPoints->25,
Contours->nbrContours,
ContourStyle->
Table[{Hue[(k-1)/(nbrContours-1)]},{k,nbrContours}],
ContourShading->False];

ContourPlot[f[x,y],{x,xmin,xmax},{y,ymin,ymax},
PlotPoints->25,
Contours->nbrContours,
ContourStyle->
Table[{Hue[(k-1)/(nbrContours-1)]},{k,nbrContours}],
ColorFunction->(Hue[#]&)];


Bob Hanlon

In article <bdjggb$8f3$ XXXX@XXXXX.COM >, "mail.post2office.cornell.edu"


<< How do I make a Contour Plot of 3D-points {x,y,z}, with different
colors indicating the height values (z) and x,y as the axes???
>><BR><BR>

 
 
 

Plotting 3D points on 2D-contour plots with colors indicating z values

Post by Jens-Peer » Wed, 02 Jul 2003 22:08:07

Hi,

can you be more specific ?
Are your 3D-points on a regular grid ?
If not use the ContourPlot version form Tom Wickham-Jones
book
http://www.yqcomputer.com/

On a regular grid ListContourPlot[] will do it for you.

Regards
Jens