I can get a plot to generate legends for different functions when these functions are put into a hand-coded list. However, when I generate the list of functions using Table[] only one legend is generated. In the code below four plots are generated but only the first two have different legends and colors for the two curves plotted.
Is there a way to produce one legend per curve plotted when the list of functions is generated by Table (or some other function)?
f1[x_] := Sin[x]; f2[x_] := Cos[x]; f = {f1, f2} Plot[{f1[x], f2[x]}, {x, 0, 2 Pi}, PlotLegends -> {"Sin", "Cos"}] Plot[{f[[1]][x], f[[2]][x]}, {x, 0, 2 Pi}, PlotLegends -> {"Sin", "Cos"}] Plot[Table[f[[i]][x], {i, 1, 2}], {x, 0, 2 Pi}, PlotStyle -> {Red, Blue}, PlotLegends -> {"Sin", "Cos"}] Plot[Table[f[[i]][x], {i, 1, 2}], {x, 0, 2 Pi}, PlotStyle -> {Red, Blue}, PlotLegends -> "AllExpressions"] 