1
$\begingroup$

Is there a way to recreate a similar image as below in Mathematica? In the figure it is a distribution that is continuous in one dimension and discrete in another. I'm looking not so much to defining a distribution function with that property, but just creating a similar figure of distributions on parallel sheets as they described.


enter image description here

Image Source: "Actuarial Mathematics", 2nd Edition, Bowers et al, pg 309

$\endgroup$

1 Answer 1

1
$\begingroup$

Adjust as needed:

f1[x_] := x^2 + Sin[x];
f2[x_] := .4 x^2 + .2 Sin[x + .3];
f3[x_] := .8 x^2 + Cos[2 x];
f1fig = ParametricPlot3D[{x, 0, z},
   {x, 0, 1}, {z, 0, f1[x]},
   PlotStyle -> Directive[Opacity[0.5], Yellow],
   BoxRatios -> {1, 1, 1}];
f2fig = ParametricPlot3D[{x, .5, f2[x]},
   {x, 0, 1},
   PlotStyle -> Directive[Black, Thickness[0.02]],
   BoxRatios -> {1, 1, 1}];
f3fig = ParametricPlot3D[{x, 1.5, z},
   {x, 0, 1}, {z, 0, f3[x]},
   PlotStyle -> Directive[Opacity[0.5], Blue],
   BoxRatios -> {1, 1, 1}];
Show[f3fig, f2fig, f1fig]

enter image description here

$\endgroup$
1
  • $\begingroup$ Perfect, thank you! $\endgroup$
    – sheppa28
    Commented Jan 11, 2019 at 21:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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