Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Plot in different colours' topicStudent Support Forum > General > "Plot in different colours"

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
Michael
12/19/12 11:15am

Try

f[x_] := {x, x^2};
Plot[Evaluate[f[x]], {x, 0, 1}]

and

Plot[Evaluate[f[x][[1]]], {x, 0, 1}]
Plot[Evaluate[f[x][[2]]], {x, 0, 1}]

(Plot by default holds the expression to be graphed in unevaluated form. Evaluate overrides that. To Plot the Head of f[x] is f and the head of Evaluate[f[x]] is List, which causes the difference.)

URL: ,

Subject (listing for 'Plot in different colours')
Author Date Posted
Plot in different colours igor_igel 12/18/12 12:43pm
Re: Plot in different colours Michael 12/19/12 11:15am
< Previous CommentHelp | Reply To Comment | Reply To Topic