1

Related to this question here. I dont understand why Evaluated->True does not behave properly when also using PlotLegends. For example, running the code below

f[x_, y_] := x^2 + 2 y;
Plot[Array[f[x, #1] &, 3, {1, 2}], {x, 1, 5}, PlotLegends -> Table[x, {x, 1, 3}], Evaluated -> True]

will give result with only Evaluated option which does not give the correct Legends (same thing happens if I add Evaluate before the PlotLegend list (Table[x, {x, 1, 3}]).

However, if I add Evaluate before the plotting argument, then it works fine:

Plot[Evaluate@Array[f[x, #1] &, 3, {1, 2}], {x, 1, 5}, PlotLegends -> Table[x, {x, 1, 3}]]

With Evaluated Option

Clearly, Evaluate and Evaluated works differently when there is PlotLegends. Why?

Histoscienology
  • 368
  • 1
  • 8
  • If relevant, Im using Mathematica 12.0.0.0 on Mac OS X – Histoscienology Feb 08 '20 at 23:52
  • Evaluated is not a valid Plot option. It should be colored red to indicate that, but it does not. Seems like a bug to me. – Rohit Namjoshi Feb 09 '20 at 00:49
  • 1
    Evaluated is recognized normally by Plot, although it is not documented. There were some discussions here, or here, it is very useful in some cases. Second link gives a workaround: using defined PlotStyle and LineLegend. – Alx Feb 09 '20 at 08:42

0 Answers0