9
$\begingroup$

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

$\endgroup$
5
  • 2
    $\begingroup$ Try Show@Table[ ParametricPlot3D[{x, y, Sin[x + y]}, {y, 0, 2 \[Pi]}], {x, Subdivide[0, 2 Pi, 10]}] as a first attempt. $\endgroup$ Commented Nov 11, 2019 at 11:50
  • $\begingroup$ @Ulrich Neumann, Thank you. $\endgroup$ Commented Nov 11, 2019 at 12:00
  • $\begingroup$ You are welcome $\endgroup$ Commented Nov 11, 2019 at 12:05
  • $\begingroup$ Or in a single ParametricPlot3D: ParametricPlot3D[ Evaluate[ Tooltip[{#, y, Sin[# + y]}, StringForm["x = ``", #]] & /@ Subdivide[0, 2 Pi, 10]], {y, 0, 2 \[Pi]}, ColorFunction -> "BlueGreenYellow"] $\endgroup$ Commented Nov 11, 2019 at 14:24
  • $\begingroup$ @Bob Hanlon, Thank you. $\endgroup$ Commented Nov 11, 2019 at 14:31

1 Answer 1

3
$\begingroup$

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

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.