This question already has an answer here:

I'm trying to draw 3D plot from my experimental points in the way shown at the figure below:

enter image description here

I tried to use ListPointPlot3D for that, but obviously there is no option Joined as in ListPlot.

mydata = Table[{x, y, x*y*y}, {x, 0, 1, 0.03}, {y, 0, 10, 1}];
ListPointPlot3D[mydata, Filling -> Bottom, 
 ColorFunction -> Function[{x, y, z}, RGBColor[y, 0., 0.3]]]

So I obtained this:

enter image description here

Any idea how I can join the point to obtain the set of flat curves with filling?


marked as duplicate by Jason B., MarcoB, RunnyKine, user9660, Jens Mar 31 '16 at 15:43

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


I don't see an easy way to do this with ListPointPlot3D or by layering a bunch of 2D ListPlots in a 3D box. However, it's fairly straightforward to do this manually, with basic graphics primitives. The shape of each curve is simply a polygon that traverses all the points in each row, but also includes one point at at z = 0 below the first and last point in the list. You'll just have to take care of colouring yourself:

color[n_] := With[{palette = ColorData[97, "ColorList"]},
  palette[[Mod[n, Length@palette, 1]]]
      Polygon[Join[#, {Last@#*{1, 1, 0}, First@#*{1, 1, 0}}]]
    } &,
  BoxRatios -> {1, 1, 1/2},
  Axes -> True,
  Lighting -> "Neutral"

enter image description here

Note that this fills in the y-z planes. If you want to fill in the x-z planes instead, simply use Transpose @ mydata inside the MapIndexed instead:

enter image description here


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