I need to plot many function pairs $\{f_i(x),f_i(x) + e h_i(x)\}$, where $e$ is a small parameter, say 0.05, in a single plot with a legend generated using PlotLegends. Here is a minimalist example of what the code would look like for just two pairs:
Block[{func, h = e Sin[2 Pi x], eval = 0.05}, func = {x, x + h, x^2, x^2 + h}; Plot[Evaluate[func /. e -> eval], {x, 0, 1}, PlotLegends -> "Expressions", PlotLabel -> "e = " <> ToString[eval]]] However, the parameter $e$ is evaluated in the legend, while I prefer to have only the symbol $e$ there, not its value, which in turn must be displayed by PlotLabel. I tried using an explicit list of expressions as the value of PlotLegends option:
Block[{func, h = e Sin[2 Pi x], eval = 0.05}, func = {x, x + h, x^2, x^2 + h}; Plot[Evaluate[func /. e -> eval], {x, 0, 1}, PlotLegends -> func, PlotLabel -> "e = " <> ToString[eval]]] This leaves $e$ unevaluated, but sorts the expressions in the legends, which is also undesirable. Any ideas?
PlotLegends -> HoldForm /@ func$\endgroup$