MathGroup Archive 2007

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

Search the Archive

Re: Dashing with alternating colors?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80406] Re: [mg80367] Dashing with alternating colors?
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Tue, 21 Aug 2007 05:08:53 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

Plot[2 x^2 - 8 x - 5, {x, 0, 10},
 ColorFunctionScaling -> False,
 ColorFunction ->
  Function[{x, y}, If[EvenQ[Round[x]], Red, Blue]]]


Bob Hanlon

---- AES <siegman at stanford.edu> wrote: 
> Any simple PlotStyle to plot a curve with segments in alternating colors?
> 
> [I can think of plotting the curve twice, in alternating colors, dashed 
> both times, and somehow offsetting the dashes (how to do that 
> accurately?) -- or plotting it solid once, then overlaying it dashed in 
> the other color.  But a neater way?]
> 



  • Prev by Date: On partitioning lists by intervals
  • Next by Date: Any way to exclude branch-cut fills in this plot?
  • Previous by thread: Re: Dashing with alternating colors?
  • Next by thread: On partitioning lists by intervals