MathGroup Archive 1999

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

Search the Archive

Re: How display negative contours with dashed lines?

  • To: mathgroup at
  • Subject: [mg16868] Re: How display negative contours with dashed lines?
  • From: "Allan Hayes" <hay at>
  • Date: Mon, 5 Apr 1999 02:24:15 -0400
  • References: <7e1d1b$>
  • Sender: owner-wri-mathgroup at

WOOD DAVID M <dmwood at slate.Mines.EDU> wrote in message
news:7e1d1b$bd6 at
> Howdy all.
>   Despite rooting around like a cyber-pig after Mathematica truffles
> (with DejaNews, AltaVista, and on MathSource), I can find no
> suggestions or even mention of something that I suspect isn't hard to
> do [except for me :)]
> I'd like to produce contour plots for which NEGATIVE function values
> are indicated as dashed lines, while other values use solid lines.
> Can anyone suggest how I can on-the-fly specify ContourStyle options
> that will display negative contour values (say in ContourPlot or
> ListContourPlot) as *dashed* lines, via (e.g.) Dashing [or in any
> other way]?
> Many thanks!
> --
> David M. Wood
> Department of Physics, Colorado School of Mines, Golden, CO 80401
> Phone: (303) 273-3853; Fax: (303) 273-3840
> e-mail: dmwood at physics.Mines.EDU ; NeXTMail welcome


It will be simpler if we use a function:

cg=ContourPlot[fn[x,y], {x,-1,1},{y,-1,1}, Contours -> 2]

This outputs a ContourGraphics object, which does not store lines
and polygons (please check InputForm[cg])

Convert to a Graphics object, which does (please check InputForm)


Now adjust the contour lines and show

{dir,Hue[0], Thickness[.02],Dashing[{.05,.05}], ln}]

Allan Hayes
Mathematica Training and Consulting
Leicester UK
hay at
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

  • Prev by Date: Re: New position: MathLink Developer
  • Next by Date: Re: Q: LinkInterrupt[link]
  • Previous by thread: How display negative contours with dashed lines?
  • Next by thread: Re: How display negative contours with dashed lines?