# Plot a loop using the same function [closed]

To generate a plot of multiple functions, I currently use this syntax:

Plot[{Sin[x], Sin[2 x], Sin[3 x]}, {x, 0, 2 Pi},
PlotLegends -> "Expressions"]


This generates a plot of 3 functions as shown below. I would like to fund out if there is a way to instead loop through values of i = 1, 2 and 3 plotting the function y = Sin(ix) to come up with the same result.

## closed as off-topic by m_goldberg, corey979, march, Feyre, MarcoBJan 12 '17 at 5:05

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." – m_goldberg, corey979, MarcoB
If this question can be reworded to fit the rules in the help center, please edit the question.

• try Plot[Evaluate[Sin[# x] & /@ Range], {x, 0, 2 Pi}, PlotLegends -> "Expressions"]? – kglr Jan 11 '17 at 14:52
• Or Plot[Evaluate@Table[Sin[i x], {i, 1, 3}], {x, 0, 2 Pi}, PlotLegends -> "Expressions"] – corey979 Jan 11 '17 at 15:01
• Both of these work. Why does Plot [Table[Sin[i x], {i, 1, 3}], {x, 0, 2 Pi}] provide the plot but not the different colors? – user32882 Jan 11 '17 at 15:49
• – Kuba Jan 11 '17 at 16:31
• Possible duplicate of Plot draws list of curves in same color when not using Evaluate – march Jan 11 '17 at 18:44