1
$\begingroup$

I have about 30 PDFs (normal distributions). The mean of each is 0.386, but every one has a different standard deviation. I want to show them all together in a single plot with different color and name (line 1, 2, 3, ...)

I can plot a single PDf and then using Show, I can show them together, but it takes too much time. I have to Plot every single one of them and then I have to use Show. But can I do it quickly using a single line?

$\endgroup$
2
$\begingroup$

Maybe something like this

ListLinePlot[
 Table[Table[PDF[NormalDistribution[n, 4], x], {x, 0, 30}], {n, 6, 16, 2}],
 PlotRange -> All,
 Filling -> Axis,
 PlotLegends -> Range[6, 16, 2]]

enter image description here

$\endgroup$
  • $\begingroup$ PDF[NormalDistribution[.386, n], x], looks more like the OP's question :) $\endgroup$ – Dr. belisarius Dec 3 '15 at 14:14
0
$\begingroup$
Show[
 Table[
  ParametricPlot3D[{i, x, PDF[NormalDistribution[.386, .3 i], x]},
   {x, -5, 5},
   PlotStyle -> Hue[i/30],
   PlotRange -> {{0, 30}, {-4, 4}, {0, .5}}],
  {i, 1, 30}],
 BoxRatios -> {1, 1, 1},
 ImageSize -> 500
 ]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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