Re: contourplots
- To: mathgroup at smc.vnet.net
- Subject: [mg19731] Re: [mg19695] contourplots
- From: "David Park" <djmp at earthlink.net>
- Date: Mon, 13 Sep 1999 02:41:00 -0400
- Sender: owner-wri-mathgroup at wolfram.com
>Hello Mathgroup, > >Is it possible to do ContourPlots with no Shading but with a different color >for each contour line? > >Laurence Lours > > Laurence, Here is the code for a simple example: f[x_, y_] := x^2 + y^2 plot1 = ContourPlot[f[x, y], {x, -5, 5}, {y, -5, 5}, ContourShading -> False]; colfun[z_] := Hue[z/50] clines = First[Graphics[plot1]] /. Line[pts_] :> {colfun[f @@ pts[[1]]], Line[pts]}; Show[Graphics[{clines}], AspectRatio -> Automatic, Frame -> True, FrameLabel -> {x, y}, PlotLabel -> f[x, y]] I am separately sending you a notebook which illustrates it in more detail. David Park djmp at earthlink.net http://home.earthlink.net/~djmp/