Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Dashing with alternating colors?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80397] Re: Dashing with alternating colors?
  • From: Helen Read <hpr at together.net>
  • Date: Tue, 21 Aug 2007 05:04:12 -0400 (EDT)
  • References: <fabgd2$i93$1@smc.vnet.net>
  • Reply-to: HPR <read at math.uvm.edu>

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?