I am trying to plot the given equation as a StackedListPlot. It works normally when I use the Plot function but does not work when I use the StackedList Plot.
params = {c -> 1, e -> .1, u -> .5, m -> 0.001, q -> .2};
fig1a = StackedListPlot[{1/(
2 c d (c + d - q)) (c^2 d + c d^2 + 2 c^2 e + c d e - d^2 e +
c^2 m + c d m - 2 c d q - c e q + d e q - c m q + d m q +
c^2 u + c d u -
c Sqrt[-4 d m (-c + e + m) (c + d -
q) + (d (e + 2 m) - (e + m) q + c (-d + 2 e + m + u))^2] -
d Sqrt[-4 d m (-c + e + m) (c + d -
q) + (d (e + 2 m) - (e + m) q +
c (-d + 2 e + m + u))^2]) /. params, (
c d - 2 c e - d e - c m - 2 d m + e q + m q - c u +
Sqrt[-4 d m (-c + e + m) (c + d - q) + (d (e + 2 m) - (e + m) q +
c (-d + 2 e + m + u))^2])/(2 d (c + d - q)) /. params}, {d,
0, 2} , PlotStyle -> {Blue, Red}, PlotRange -> {0, 1}]
I am getting the error
An option must be a rule or a set of rules
{d,0,2}
)...". This is aListPlot
: you should provide it numerical values only. You can't specify a range for the independent variable. UsePlot
instead ofStackedListPlot
and you'll get your result. $\endgroup$