# Apply different PlotStyles to functions with functions as variable [closed]

I have a function func[expr,var] with which I want to plot the list expr[var] and have different styles applied to it. When doing this with ListPlot, it works, but somehow this just gives the plot with the first PlotStyle given.

To be specific:

func[expr_, var_] := Module[{f}, f[x_] := Evaluate[expr /. var -> x]; Plot[f[x], {x, 0, 10}, PlotStyle -> {{Red}, {Black}}]]

This gives the plot of Sin[x] and Sin[2x] both in red. How do I get one the first expression in red and the second in black?

## closed as off-topic by m_goldberg, MarcoB, Alex Trounev, happy fish, C. E.May 1 at 12:50

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – MarcoB, Alex Trounev, happy fish, C. E.
If this question can be reworded to fit the rules in the help center, please edit the question.

• Why not just func[expr_, var_] := Plot[expr, {var, 0, 10}, PlotStyle -> {{Red}, {Black}}]? – J. M. will be back soon Mar 31 at 22:48
• True :'D I must've somehow come to the conclusion that this would not work for some reason. Now I changed quite a bit in the structure and this seems to work again. Thanks – Innerw0lf Mar 31 at 22:52

Keep f as a list of functions, rather than a new function f[x].
func[expr_, var_] := Module[{f, x},