MathGroup Archive 2007

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

Search the Archive

RE: Dashing with alternating colors?


Hi, 
 
> 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?]

There is 

	ListLinePlot[Table[Sin[x], {x, 0, 2 Pi, 0.1}], Joined -> True, 
	 PlotStyle -> Directive[Opacity[0.5], Thick], Mesh -> 10, 
	 MeshFunctions -> {#1 &}, MeshShading -> {Red, Blue}]

>From the online help.


  • Prev by Date: Any way to exclude branch-cut fills in this plot?
  • Next by Date: Redefine Arg to return a value from 0 to 2 pi
  • Previous by thread: Dashing with alternating colors?
  • Next by thread: Re: RE: Dashing with alternating colors?