Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have a data list in the following form,

data = {x, y, z, f}

I would like to present three kinds of subdata set as a density (or contour) plot on the respective planes at once in one 3D graph.

  1. data1 = {x, y, f}

  2. data2 = {y, z, f}

  3. data3 = {x, z, f}

How could I make an above kind of plot?

I really appreciate if anyone help me.

share|improve this question

1 Answer 1

For example:

f[x_, y_, z_] := x + y y + z z z
data = Flatten[Table[{{x, y, z}, f[x, y, z]}, {x, 0, 1, .1}, {y, 0, 1, .1}, {z, 0, 1, .1}], 2];
fi = Interpolation@data;
dpx = Rasterize@ DensityPlot[fi[0, y, z], {y, 0, 1}, {z, 0, 1}, Frame -> False, 
    ColorFunction -> "SunsetColors", PlotRangePadding -> 0];
dpy = Rasterize@ DensityPlot[fi[x, 0, z], {x, 0, 1}, {z, 0, 1}, Frame -> False, 
    ColorFunction -> "GreenPinkTones", PlotRangePadding -> 0];
dpz = Rasterize@ DensityPlot[fi[x, y, 0], {x, 0, 1}, {y, 0, 1}, Frame -> False, 
    ColorFunction -> "ThermometerColors", PlotRangePadding -> 0];
Graphics3D[{
  {Texture@dpx, Polygon[{{0, 0, 0}, {0, 1, 0}, {0, 1, 1}, {0, 0, 1}}, 
    VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}]},
  {Texture@dpy, Polygon[{{0, 0, 0}, {1, 0, 0}, {1, 0, 1}, {0, 0, 1}}, 
    VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}]}, 
  {Texture@dpz, 
   Polygon[{{0, 0, 0}, {1, 0, 0}, {1, 1, 0}, {0, 1, 0}}, 
    VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}]}}, 
 Lighting -> "Neutral"]

Mathematica graphics

share|improve this answer
    
Many thanks. It helped. –  user58226 Oct 28 '13 at 14:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.