MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Plot Table of functions does not distinguish colors

  • To: mathgroup at smc.vnet.net
  • Subject: [mg102700] Re: [mg102676] Plot Table of functions does not distinguish colors
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Wed, 19 Aug 2009 07:03:28 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <200908181009.GAA17776@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

Why?  Because that's the way it is!

This was discussed some time ago in MathGroup, although I cannot 
retrieve the reference.

If you want different colors, just wrap the Table expression with Evaluate.

fd wrote:
> All, this seems like a simple question, but when I want to create a
> table with different function as in the example
> 
> Plot[Table[Sin[n x], {n, 1, 3, 1}], {x, 0, 2 Pi}, PlotRange -> All,
> PlotStyle -> Thick]
> 
> I get all three plots with the same color. If I instead write the
> table manually
> 
> Plot[{Sin[x], Sin[2 x], Sin[3 x]}, {x, 0, 2 Pi},PlotStyle->Thick]
> 
> This gives a different plot with a different color for each plot.
> 
> Can anyone shed some light on why this behavior?
> 
> Best
> 

-- 
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


  • Prev by Date: Re: Re: why the inputs are not ODEs in NDSolve function
  • Next by Date: Inconsistency in ListPlot vs. other plotting functions (solution)
  • Previous by thread: Re: Plot Table of functions does not distinguish colors
  • Next by thread: Re: Plot Table of functions does not distinguish colors