MathGroup Archive 2001

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

Search the Archive

Re: ColorFunction

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27743] Re: ColorFunction
  • From: "Paul Lutus" <nospam at nosite.com>
  • Date: Wed, 14 Mar 2001 04:06:43 -0500 (EST)
  • References: <98kodo$ppk@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

"Michael Wild" <wild at ilt.fhg.de> wrote in message
news:98kodo$ppk at smc.vnet.net...
> Dear Colleagues,
> I am trying to display a r-z-temperature field with ContourPlot.
> How can I modify the ColorFunction command such that the
> temperature range from
> 100-200 K
> 200-300 K
> etc. is displayed in the same color no matter if the total
> temperature range of the plot is 0 to 500 K or
> 0 to 1000 K.
> My current plot command is
> ContourPlot[templim[r, z], {r, 0, 2}, {z, 0, 4}, PlotRange -> All,
>   ColorFunction -> (Hue[0.7(1 - 0.79*#)] &),
>   PlotPoints -> 150, AspectRatio -> 1/2,
>   Contours -> {100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100,
> 1200,
>       1300, 1400, 1500}]

Well, as you have not provided your function "templim[]", I cannot perform a
direct test, but why not write a function or expression that simply provides
"ColorFunction" with the information you want to supply it with?

data = Table[Hue[Mod[i,2]*.7],{i,0,8}];

ContourPlot[E^-(x^2+y^2) ,{x,-1,1},{y,-1,1},PlotRange->All,
  ContourLines->False,ColorFunction->(data[[Floor[#*8]+1]]&)]

As shown, you could create a list of the colors you want, in any order you
want, and index the list for ColorFunction.

--
Paul Lutus
www.arachnoid.com





  • Prev by Date: Re: D attributes
  • Next by Date: RE: ColorFunction
  • Previous by thread: ColorFunction
  • Next by thread: RE: ColorFunction