MathGroup Archive 2007

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

Search the Archive

Re: Dashing with alternating colors?


AES 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?]

Something like this?

Plot[Sin[x], {x, -2 \[Pi], 2 \[Pi]}, Mesh -> 20,
  MeshFunctions -> {#2 &}, MeshShading -> {Red, Blue},
  PlotStyle -> Thick]



-- 
Helen Read
University of Vermont


  • Prev by Date: Re: Mathematica 6 "save as PDF" page size issues
  • Next by Date: Re: "385-bit SHA code:"
  • Previous by thread: Re: Missing information in Mathematica 6.0 Documentation
  • Next by thread: Re: Dashing with alternating colors?