MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Density Plots

  • To: mathgroup at smc.vnet.net
  • Subject: [mg42598] Re: Density Plots
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 18 Jul 2003 05:24:54 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <bf5kci$mh1$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

you can't do that with a ListSurfacePlot3D[], you can do that
with a SurfaceGraphics[] with

dta = Table[Sin[x*y], {y, 0, Pi, Pi/30}, {x, 0, Pi, Pi/30}];
plt = ListPlot3D[dta];
Show[DensityGraphics[plt], ColorFunction -> Hue]


or you need some more programing

Needs["Graphics`Graphics3D`"]

dta = Table[{x, y, Sin[x*y]}, {y, 0, Pi, Pi/10}, {x, 0, Pi, Pi/10}];

plt = ListSurfacePlot3D[dta];
ColorPolygonIn2D[Polygon[pnts_]] :=
  Module[{z},
    z = Plus @@ (Last /@ pnts)/Length[pnts];
    
    {Hue[z], Polygon[Drop[#, -1] & /@ pnts]}
    ]


Show[plt /.
    Graphics3D[poly_, ___] :> Graphics[ColorPolygonIn2D /@ poly]]

Regards
  Jens


Full Name wrote:
> 
> Hi,
> I have a ListSurfacePlot3D, and I would like to do a density plot such
> that z is plotted as a function of x and y, with the heights represented
> by colors. Any suggestion that may help will be greatly appreciated.
> Kindly respond to the following address:
> jamckenz at mtholyoke.edu
> Thanks.


  • Prev by Date: Re: expanding a list
  • Next by Date: Re: expanding a list
  • Previous by thread: Re: Density Plots
  • Next by thread: Basic Stat Question