Re: weird behavior when plotting multiple functions in
- To: mathgroup at smc.vnet.net
- Subject: [mg76095] Re: [mg76050] weird behavior when plotting multiple functions in
- From: Murray Eisenberg <murray at math.umass.edu>
- Date: Wed, 16 May 2007 05:28:54 -0400 (EDT)
- Organization: Mathematics & Statistics, Univ. of Mass./Amherst
- References: <200705150859.EAA17134@smc.vnet.net>
- Reply-to: murray at math.umass.edu
Yes, but use
f[x_]={Sin[x],Cos[x]};
Plot[Evaluate[f[x]],{x,0,4*Pi}]
and again you will get a blue sine curve and a red cosine curve.
Roman wrote:
> Hello all:
>
> When I plot
> Plot[{Sin[x], Cos[x]}, {x, 0, 4*Pi}]
> I get two curves: one blue, one red.
>
> But when I do
> f[x_] = {Sin[x], Cos[x]};
> Plot[f[x], {x, 0, 4*Pi}]
> both curves are blue. It is as if at some level Mathematica does not
> understand that I'm actually plotting two curves at a time, and uses
> the first color specification (blue) for both curves.
>
> This is particularly annoying when you want to play with plot styles,
> for example filling instructions, like
> Filling -> {1 -> -1, 2 -> 1}
> which works in the first example but not in the second one.
>
> Has anyone figured out a workaround for this one?
>
> Thanks!
> Roman.
>
>
--
Murray Eisenberg murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305
- References:
- weird behavior when plotting multiple functions in 6.0
- From: Roman <rschmied@gmail.com>
- weird behavior when plotting multiple functions in 6.0