MathGroup Archive 2012

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

Search the Archive

Re: Defining a value-specific ColorFunction for use in ListDensityPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg125833] Re: Defining a value-specific ColorFunction for use in ListDensityPlot
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Wed, 4 Apr 2012 04:32:51 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201204030846.EAA17328@smc.vnet.net>

data = Table[
   With[
    {r = RandomReal[{0, 5}],
     t = RandomReal[{0, 2 Pi}]},
    {r Cos[t], r Sin[t], 10 Sin[r]}],
   {10^4}];

ListDensityPlot[data, PlotRange -> All,
 ColorFunction -> (Blend[{Blue, Red}, #] &)]


Bob Hanlon

On Tue, Apr 3, 2012 at 4:46 AM, Andrew DeYoung <adeyoung at andrew.cmu.edu> wrote:
> Greetings,
>
> I would like to create a ListDensityPlot in which the color is "deep"
> blue for function values of -10 and "deep" red for function values of
> +10, and varies linearly for function values in between -10 and +10.
> (I'm plotting the electric potential on a surface of points (x,y); the
> voltage ranges from -10 V to +10 V.)  Is there a way that I can create
> such a ColorFunction for use in several ListDensityPlot plots?
>
> Thank you so very much for your time!
>
> Andrew DeYoung
> Carnegie Mellon University
>



  • Prev by Date: How to generate ``nice'' algebra output from command-line mathematica?
  • Next by Date: Re: How to get this gaussian integral result?
  • Previous by thread: Defining a value-specific ColorFunction for use in ListDensityPlot
  • Next by thread: Re: Defining a value-specific ColorFunction for use in ListDensityPlot