MathGroup Archive 2001

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

Search the Archive

Re: PlotStyles

  • To: mathgroup at
  • Subject: [mg30858] Re: [mg30815] PlotStyles
  • From: BobHanlon at
  • Date: Thu, 20 Sep 2001 03:52:10 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

In a message dated 2001/9/19 12:47:47 AM, mcoleman at writes:

>Is there a way to apply different PlotStyles to a single list of data 
>in a List Plot command? For instance, can I specifiy the first
>half of the data points to be one color, and the remaining half to be
>another, so that it is easy to visually separate the two subsets of data.
>I know that this could be done by creating separate graphs and then 
>overlaying them,  but I'm curious is this can be done within a single 
>Plot or ListPlot command.

You can use a single MultipleListPlot by partitioning the data


data = Table[{x, Exp[-Sqrt[x]]*Sin[2x]}, 
      {x, 0, 3Pi, Pi/16}];

    (Take[data, (-1)^n++ * #[(Length[data]+1)/2]])& /@  
      {Floor, Ceiling}, PlotJoined->True,
    Frame->True, Axes->False, PlotRange->All,
    FrameTicks->{PiScale, Automatic, None, None},
    PlotStyle->{{AbsoluteDashing[{5,5}], Blue}, Red}];

Bob Hanlon
Chantilly, VA  USA

  • Prev by Date: Some advanced formatting options.
  • Next by Date: RGBColor [?,?,?]
  • Previous by thread: Re: PlotStyles
  • Next by thread: RE: PlotStyles