Skip to main content
edited tags
Link
Mr.Wizard
  • 275.2k
  • 34
  • 606
  • 1.5k
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.
Link
user484
user484

Difference in Plot when using Evaluate vsdraws list of curves in same color when not using Evaluate

Tweeted twitter.com/#!/StackMma/status/169345094330232832
Added pictures mostly
Source Link
David
  • 15.1k
  • 6
  • 53
  • 82

Difference in Plot when using Evaluate vs when not using evaluate:Evaluate

This example comes from http://reference.wolfram.com/mathematica/ref/Plot.html?q=Plot&lang=enthe Mathematica documentation for Plot under 'Basic Examples' -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[]Evaluate[] is removed to get, all of them are the same color:

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

They are all plotted as the same color!?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? Thanks!

Difference in Plot when using Evaluate vs when not using evaluate:

This example comes from http://reference.wolfram.com/mathematica/ref/Plot.html?q=Plot&lang=en 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] 

But when Evaluate[] is removed to get:

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

They are all plotted as the same color!?

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? Thanks!

Difference in Plot when using Evaluate vs 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?

Source Link
trayres
  • 1.2k
  • 2
  • 9
  • 7
Loading