# Plotting works, but manipulating the plot does not

If the following works for me,

Block[{a = 0.35, b = 0.25}, Plot[PDF[\[ScriptCapitalD]A, x], {x, 0, 1}, PlotRange -> {{0, 1}, {0, 50}}, Filling -> Axis]]


then why won't this manipulate work:

Manipulate[Plot[PDF[\[ScriptCapitalD]A, x], {x, 0, 1}, PlotRange -> {{0, 1}, {0, 50}}, Filling -> Axis], {{a, 1/2}, 0, 1}, {{b, 1/2}, 0, 1}]

• Make your plotting function a function of a and b Sep 10, 2018 at 13:04
• I am quite new to Mathematica. @Lotus, could you demonstrate, please? Sep 10, 2018 at 13:05
• How is [ScriptCapitalD]A defined ? Give me its definition. Sep 10, 2018 at 13:15

Not an answer because the question is incomplete. Here is an example though:

If you are plotting a GammaDistribution with two parameters we can define

\[ScriptCapitalD]A[a_, b_] := GammaDistribution[a, b];


Now:

Block[{a = 0.35, b = 0.25},
Plot[PDF[\[ScriptCapitalD]A[a, b], x], {x, 0, 1},
PlotRange -> {{0, 1}, {0, 50}}, Filling -> Axis]]

Manipulate[
Plot[PDF[\[ScriptCapitalD]A[a, b], x], {x, 0, 1},
PlotRange -> {{0, 1}, {0, 50}}, Filling -> Axis], {{a, 1/2}, 0,
1}, {{b, 1/2}, 0, 1}]