Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ListPlot3d and ListDensityPlot

130 views
Skip to first unread message

ricomelg...@gmail.com

unread,
May 31, 2013, 3:16:17 AM5/31/13
to
Dear users of Mathematica
Is it possible to combine ListPlot3d and ListDensityPlot in a single 3D plot, just as ut can be done in Matlab via the function meshc?. This is, a surface given by ListPlot3D and a densityplot drawn at the floor of the 3D space.

Jesus

debguy

unread,
Jun 11, 2013, 2:26:23 AM6/11/13
to
Mathematica's Show[ g1, g2 ] combines graphics. GraphicsArray is
another way. There are various ways to plot density graphics.

ListPlot3D[Table[Sin[.2x] Sin[.2y], {x, -20, 20}, {y, -20, 20}]]

ListDensityPlot[Table[Sin[.2x] Sin[.2y], {x, -20, 20}, {y, -20, 20}]]

Show[Graphics[Raster[
Table[Sin[.2x] Sin[.2y], {x, -20, 20}, {y, -20, 20}]]]]

~DensityGraphics~[[1]] is a simple data list and plotted "specially"
but it is not very special - it's not a spline function to have to be
compatible with or something.

J Jesus Rico-Melgoza

unread,
Jun 12, 2013, 5:24:46 AM6/12/13
to

Thanks
I have done the following:

Imag2 = ListPlot3D[Table[Sin[.2 x] Sin[.2 y], {x, -20, 20}, {y, -20, 20}]]
Imag1 = ListDensityPlot[
Table[Sin[.2 x] Sin[.2 y], {x, -20, 20}, {y, -20, 20}], Frame -> None]
plane = Table[-2, {i, 40}, {j, 40}];
ListPlot3D[{Table[Sin[.2 x] Sin[.2 y], {x, -20, 20}, {y, -20, 20}], plane},
BoxRatios -> 1, Mesh -> None, BoxRatios -> 1, Mesh -> None,
TextureCoordinateFunction -> ({#1, #2} &), TextureCoordinateScaling ->
True,
PlotStyle -> Texture[Imag1]]


I have to draw a plane a then color it using the image generated by the
LineDensityPlot.


The result is not very nice though!


Jesus




2013/6/11 debguy <johnan...@cox.net>
0 new messages