MathGroup Archive 1998

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

Search the Archive

Re: ColorFunction in DensityPlot

  • To: mathgroup at
  • Subject: [mg14205] Re: ColorFunction in DensityPlot
  • From: "Allan Hayes" <hay at>
  • Date: Wed, 7 Oct 1998 03:00:38 -0400
  • References: <6u87rm$>
  • Sender: owner-wri-mathgroup at

Selwyn Hollis wrote in message <6u87rm$4p3 at>...
>Let's say we're solving the heat equation on [0,1]x[0,1] numerically
>with an initial temperature distribution with values in [0,1], and
>we're displaying the solution with ListDensityPlot as it evolves over
>time. How can one specify the ColorFunction option in ListDensityPlot
>so that a temperature of 1 _always_ shows as red and a temperature of 0
>always shows as blue (with green, yellow, orange in between)? In other
>words, I need a fixed mapping between function values and color.


List density plot passes on to ColorFunction the grid values scaled so
that the used PlotRange maps onto 0 to 1. So a simple way to achieve
your immediate aim is with



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

  • Prev by Date: Re: Boolean Algebra
  • Next by Date: memory
  • Previous by thread: Re: Boolean Algebra
  • Next by thread: memory