rjbr21
(Roger J Brown)
1
I can produce a list of Plots, no problem, with this line of code
MapThread[
Plot[PDF[NormalDistribution[#1, #2], x], {x, -4, 4}] &, {{0, .1}, {1,
1.5}}]
But this code
MapThread[
Show[Plot[
PDF[NormalDistribution[#1, #2], x], {x, -4, 4}]] &, {0, .1}, {1,
1.5}]
Does not produce both plots in the same graphic.
This way:
Show[MapThread[Plot[PDF[NormalDistribution[#1, #2], x],
{x, -4, 4}] &,
{{0, .1}, {1, 1.5}}]]
rjbr21
(Roger J Brown)
3
That works just swell, Thanks. But I tried to put PlotStyle everywhere I could think of and it would not thread the colors.
Show[MapThread[
Plot[PDF[NormalDistribution[#1, #2], x], {x, -4,
4}] &, {{0, .1}, {1, 1.5}}], PlotStyle -> {Blue, Red}]
Show[MapThread[
Plot[PDF[NormalDistribution[#1, #2], x], {x, -4, 4},
PlotStyle → #3] &, {{0, .1}, {1, 1.5}, {Blue, Red}}]]
rjbr21
(Roger J Brown)
5
AHA!!
Thanks
I should be fine now with all the other options.
mfroeling
(Martijn Froeling)
6
You can also do the Map within the plot, that way you don’t need Show.
Plot[Evaluate[
PDF[NormalDistribution[#[[1]], #[[2]]], x] & /@
Thread[{{0, .1}, {1, 1.5}}]], {x, -4, 4}, PlotStyle -> {Blue, Red}]
or
Plot[Evaluate[
PDF[NormalDistribution[##], x] & @@@ {{0, 1}, {0.1, 1.5}}], {x, -4,
4}, PlotStyle -> {Blue, Red}]