I have found several topics with legend issues but no answer to my problem.
I have a function and I need to plot it for integers only (hence discrete plot) and then add a legend too. But PlotLegend
does not work, its always red (my code gets red) and does not plot it. I can confirm that it does work when I use Plot
instead of DiscretePlot
. Nevertheless I need my variable to be positive integer.
function[gh_, ga_] :=
If[gh == ga, 1 + 0.18^((gh + ga)^0.25),
1 + 0.18^((gh - ga)^2)^0.25];
DiscretePlot[{function[0, i]^i, function[0 + 1, i]^i,
function[0 + 2, i]^i}, {i, 0, 30}, PlotRange -> Full]
any ideas? I use Mathematica 8.0.0.0.