MathGroup Archive 2009

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

Search the Archive

Re: ColorFunction Range (Mathematica v7)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99970] Re: [mg99920] ColorFunction Range (Mathematica v7)
  • From: "David Park" <djmpark at comcast.net>
  • Date: Wed, 20 May 2009 05:02:31 -0400 (EDT)
  • References: <2653351.1242732437049.JavaMail.root@n11>

Use Rescale to map the actual value range to the color parameter range.

Example:

DensityPlot[5 Sin[x y], {x, -3, 3}, {y, -3, 3},
 ColorFunctionScaling -> False,
 ColorFunction -> (ColorData["Rainbow"][
     Rescale[#, {-5, 5}, {0, 1}]] &),
 PlotPoints -> 30,
 MaxRecursion -> 3]


David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/  


From: Constantinos [mailto:physicist_gr at yahoo.gr] 

Hi All,

Does anyone know how I can change the "Range" value of a preset 
ColorFunction (e.g. "TemperatureMap") in DensityPlot?

I am facing the following problem:

Let's say that the min and max values of your plotting function (not the 
color one) are fmin and fmax, respectively. Let's also assume that you set 
PlotRange->{pmin,pmax}.
If pmax is lower than fmax then the highest valued color (Red) corresponds 
to pmax but if pmax is higher than fmax the highest valued color (Red) 
corresponds to fmax. Note that we have similar situation for the minimum 
values fmin and pmin.

How can I assign the highest (lowest) valued color of a preser ColorFunction

to the desired value whatever it is.


Thanks in advance.

Constantinos







  • Prev by Date: Re: Filenames with ToString
  • Next by Date: Re: Solving for Stiffness using a plot
  • Previous by thread: ColorFunction Range (Mathematica v7)
  • Next by thread: Re: ColorFunction Range (Mathematica v7)