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$
1

2 Answers 2

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$
1
  • $\begingroup$ PDF[NormalDistribution[.386, n], x], looks more like the OP's question :) $\endgroup$ Dec 3, 2015 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 and acknowledge that you have read and understand our privacy policy and code of conduct.

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