I found the following possibility to plot a function for a table of parameters:

Plot[Evaluate@Table[a^2 + parameter, {parameter, 0, 10, 2.5}], {a, -10, 10}]

However, I'd need to plot for a list of parameters, say


How can this be done? My search always directs me to this table approach and the following presents all plots in the same color, which is not really what I want:

 Plot[(a^2 + parameter) /. parameter -> {1, 2.5, 3, 7.8, 9.572}, {a, -10, 10}]

closed as off-topic by José Antonio Díaz Navas, Sektor, Coolwater, m_goldberg, Young Apr 8 '18 at 17:24

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." – José Antonio Díaz Navas, Sektor, Coolwater, m_goldberg, Young
If this question can be reworded to fit the rules in the help center, please edit the question.


Just try (note the new curly brackets):

Plot[Evaluate@Table[a^2 + parameter, {parameter, {1, 2.5, 3, 7.8, 9.572}}], {a, -10, 10}]

enter image description here


Not the answer you're looking for? Browse other questions tagged or ask your own question.