Skip to main content
3 of 4
Since this is the de facto canonical version of the question, I've edited the title to include the words "list" and "color" so it's more likely to show up in suggested duplicates when users ask a new question. Please improve if needed.
user avatar
user avatar

Plot draws list of curves in same color when not using Evaluate

This example comes from the Mathematica documentation for Plot under Basic Examples.

Can someone please explain why these are each plotted as a different color in this case:

Plot[Evaluate[Table[BesselJ[n, x], {n, 4}]], {x, 0, 10}, Filling -> Axis] 

enter image description here

But when Evaluate[] is removed, all of them are the same color:

Plot[Table[BesselJ[n, x], {n, 4}], {x, 0, 10}, Filling -> Axis] 

enter image description here

I know it must have to do with the order of things being evaluated, but I'm really not sure why it is working like this - can someone please point me in the correct direction?

trayres
  • 1.2k
  • 2
  • 9
  • 7