I'm having trouble getting all of my lines within a Plot[] rendering to be presented in the legend. Below I illustrate the problem. I create 4 different lines in Plot[] but the legend only has the first entry.
(*set up functions*)
piFunction = (1 - Exp[-Δx a])/(1 -
Exp[-Δx 2 Ne]);(*StatMech Fixation Pr*)
rate =
mu 2/a Ne piFunction;(*Subscript[q,ij]:rate of transitioning from i \
to j*)
logRate = Log[10, rate] // Simplify;
logRateApproxList =
Table[Series[logRate, {Δx, 0, order}] //
Simplify, {order, 1, 20}] // Normal;
logRateApproxListLargeNe =
logRateApproxList /. {a -> 0,
mu -> 1, Δx -> Δy/Ne} // Cancel;
(*Plot subset of Functions*)
subList = {3, 7, 11, 15};
Plot[logRateApproxListLargeNe[[subList]], {Δy, -4, 4},
AxesLabel -> {"Δx Ne", "Θ"},
Evaluated -> True, PlotStyle -> Automatic,
PlotLegends ->
LineLegend[subList, LegendMarkers -> Automatic,
LegendFunction -> (Framed[#, RoundingRadius -> 5] &),
LegendLabel ->
Column[{"Δx", "Approximation Order"}]]]
And here's the output,
Please note I would like to utilize the PlotStyle->Automatic functionality rather than having to define the PlotStyle explicitly.
I'm using Mathematica 10.4.1 on Ubuntu 14.04


Evaluated -> Truedoesn't work well with legends. useEvaluate @ logRateApproxListLargeNe[[subList]]instead, but be mindful that does not localize the Plot variables. – Mr.Wizard Aug 09 '16 at 12:58Evaluatedis undocumented, so while it works in most cases, it can't be trusted to work in all cases. – rcollyer Aug 09 '16 at 13:01Evaluatedare relegated to "undocumented" and "can't be trusted" while the function bloat continues? Gah... – Mr.Wizard Aug 09 '16 at 13:03