9

I have the following plot, and I need to draw a waterfall plot of this. Does anyone know how I can make a waterfall plot in Mathematica?

Plot3D[Sin[x + y], {x, 0, 2 π}, {y, 0, 2 π}]

I need something like the following picture: enter image description here

gpap
  • 9,707
  • 3
  • 24
  • 66
p.kn
  • 233
  • 1
  • 9

1 Answers1

3

The issue is with the Filling option that needs to be there in 3D. I would do it as follows: separate $x_1$ and $x_2$ coordinates, plot in 2d, add an extra dimension and then put everything together with a FaceGrids option:

Graphics3D[
 Table[(First@
     Plot[Sin[x + y], {x, 0, 2 π}, Filling -> Bottom, 
      FillingStyle -> 
       Directive[White, Opacity[1], Lighting -> {"Ambient", White}], 
      ColorFunction -> "Rainbow"] /. {a_?AtomQ, b_?AtomQ} :> {a, y, 
      b}), {y, Subdivide[0, 2 Pi, 10]}], Boxed -> False, 
 FaceGrids -> {{1, 0, 0}, {0, 1, 0}, {0, 0, -1}}, 
 FaceGridsStyle -> Directive[Black]]

enter image description here

gpap
  • 9,707
  • 3
  • 24
  • 66