# Mathematica Plotlabels fails when using plot for multiple curves

Okay, this code works fine:

lmt=10; qq[zets_]:=1/Sqrt[1+zets^2]^3; zets[rr_,eps_,eta_]:=eps (1-rr^2) (1+eta (1+rr^2)); demcurves=Array[qq[zets[rr,2 #/lmt,0]]&,lmt/2]; Plot[demcurves,{rr,0,1}]

When I add labels with the code below, only the first curve is identified. How do I add labels for each curve?

demlabels = Map[ToString,Array[QqZz[N[2/lmt]#]&,lmt/2]]; Plot[demcurves,{rr,0,1},PlotLabels -> Placed[demlabels,Left]]

This works

Plot[{Labeled[ demcurves[[1]], demlabels[[1]], Below], Labeled[demcurves[[5]], demlabels[[5]], Below]}, {Rr, 0, 1}, PlotStyle -> {Red, {Blue, Dashed}}]

But this doesn't

labelray[limt_] := Array[Labeled[demcurves[[#]],demlabels[[#]],Above]&,limt]; Plot[labelray[lmt/2],{Rr,0,1}]

• Try PlotLegends instead. Plot[demcurves, {rr, 0, 1}, PlotLegends -> Placed[demlabels, Left]] May 26, 2017 at 17:46

lmt = 10;
qq[zets_] := 1/Sqrt[1 + zets^2]^3;
zets[rr_, eps_, eta_] := eps (1 - rr^2) (1 + eta (1 + rr^2));
demcurves = Array[qq[zets[rr, 2 #/lmt, 0]] &, lmt/2];

demlabels = Map[ToString, Array[QqZz[N[2/lmt] #] &, lmt/2]];


Use Evaluate and rr vice Rr

labelray[limt_] :=
Array[Labeled[demcurves[[#]], demlabels[[#]], Below] &, limt];
Plot[Evaluate@labelray[lmt/2], {rr, 0, 1}]