MathGroup Archive 2009

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

Search the Archive

Re: ListDensityPlot how to define colors for specific range of values

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100674] Re: ListDensityPlot how to define colors for specific range of values
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 10 Jun 2009 17:13:12 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <h0nuls$bei$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

data = Table[Sin[x*y], {x, -Pi, Pi, Pi/32}, {y, -Pi, Pi, Pi/32}] // N;

myColorFunction[x_] /; x < 0 := ColorData["AvocadoColors"][Abs[x]]
myColorFunction[x_] /; x >= 0 := ColorData["SunsetColors"][Abs[x]]

and

ListPlot3D[data, ColorFunction -> myColorFunction,
  ColorFunctionScaling -> False]

The trick is to use ColorFunctionScaling -> False to get the true
"z" values as argument of the color function.

Regards
   Jens



prageeth saraka wimalaweera wrote:
> Dear friends,i want to use ListDensityPlot to represent my list of data.how
> can i define specific color for specific range of values? is there any way
> to  define this in Mathamatica? your comments are highly appreciated .
> Thank you
> 
> prageeth
> 


  • Prev by Date: Re: Integrate Bug
  • Next by Date: Re: Partitioned matrix operations
  • Previous by thread: ListDensityPlot how to define colors for specific range of values
  • Next by thread: Re: ListDensityPlot how to define colors for specific range of values