# Legend for plot of multiple functions involving ReplaceAll only shows first function

In Mathematica 13.2, while defining a function for manipulating and animating a plot of multiple functions, I'm unable to generate a legend for the second and subsequent functions in my list. I've narrowed down the problem to the use of ReplaceAll(/.).

Here is a simplified demo:

1. The first Plot[] does not contain a /. and behaves correctly: Each function gets its own color and legend.
2. The second Plot[] contains a /. and plots all functions with the same color and only the first function gets a legend.
3. The third Plot[] adds an Evaluated -> True directive, which fixes the color but not the legend issue.

Plot[{x, x^2, x^3}, {x, -1, 1}, PlotLegends -> {"n=1", "n=2", "n=3"}]

Plot[{x, x^2, x^3} /. {}, {x, -1, 1}, PlotLegends -> {"n=1", "n=2", "n=3"}]

Plot[{x, x^2, x^3} /. {}, {x, -1, 1}, Evaluated -> True, PlotLegends -> {"n=1", "n=2", "n=3"}]

In my actual code, I make use of the ReplaceAll directive to expose parameters to Manipulate[] so I'd like to learn how to get legends to work with /..

I'm new to Mathematica and, from what I could tell after extensive searching on MMA.SE, the Evaluate -> True directive ought to have been enough to get Plot[] to treat its input as a true list and map each list item to a separate legend text. Clearly I'm missing some nuance. Any help would be appreciated!

Plot[Evaluate[({x, x^2, x^3} /. {})], {x, -1, 1},

• Brilliant! I was previously trying to wrap Evaluate[] around the function list itself but it makes sense why it should be wrapped around the ReplaceAll instead. Thank you!