MathGroup Archive 1995

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

Search the Archive

Re: color in ListContourPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg2257] Re: [mg2230] color in ListContourPlot
  • From: Allan Hayes <hay at haystack.demon.co.uk>
  • Date: Thu, 19 Oct 1995 01:32:15 -0400

Elizabeth Kraemer <kraemer at service1.uky.edu>
in [mg2230] color in ListContourPlot
Writes

> I want to do a ListContourPlot with a specific color range (from
> white/purple to red)

Beth,

If you use

   ListPlot[..., ColorFunction -> cf ]

then the contour layers are colored according to the directive   
cf[sh]. Where sh is the height scaled to lie between 0 and 1.

You can define cf any way you like, so long as cf[sh] is a color  
directive for all values of h between 0 and 1.

Example:
    ListPlot[..., ColorFunction -> (Hue[.8(1-#)]&) ]

will color from purple (lowest) to red (heighest).

Incidentally, the brackets round Hue[.8(1-#)]& are essential to  
stop, without them Mathematica takes ColorFunction ->  
(Hue[.8(1-#)]&) to be
(ColorFunction -> Hue[.8(1-#)])&, which is not an option.

Allan Hayes
hay at haystack.demon.co.uk



Begin forwarded message:

>From: Elizabeth Kraemer <kraemer at service1.uky.edu>
>To: mathgroup at smc.vnet.net
>Subject: [mg2230] color in ListContourPlot
>Organization: University of Kentucky

I want to do a ListContourPlot with a specific color range (from
white/purple to red).  If I just use "Hue", the high and low values  
are red.
I've got a lot of contours, so I want to avoid having to define a color 
individually for each one.  I'm running Mathematica on a Windows  
machine.
Thanks for the help!  -Beth



  • Prev by Date: Re: differentiate multivariable InterpolatingFunction?
  • Next by Date: Re: Deleting more subtle then Clear[ ] ?
  • Previous by thread: Re: color in ListContourPlot
  • Next by thread: Bug in interpretation of mma Series[] command?