Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: Colorfunction in ContourPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg112477] Re: Colorfunction in ContourPlot
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Thu, 16 Sep 2010 06:03:12 -0400 (EDT)

The colors in ContourPlot are based on the value of the function not the density of the contours.

f[x_, y_] = y*Cos[x] + x*Cos[y];

Row[{ContourPlot[f[x, y],
   {x, -Pi, 3 Pi}, {y, -Pi, 3 Pi},
   Contours -> 15,
   ColorFunction -> "TemperatureMap",
   ImageSize -> 300],
  Plot3D[f[x, y],
   {x, -Pi, 3 Pi}, {y, -Pi, 3 Pi},
   ColorFunction -> "TemperatureMap",
   ImageSize -> 300]}]


Bob Hanlon

---- Eamane <ntina.86 at libero.it> wrote: 

=============
Hello,
I beg your pardon in advance if this question has already been
asked..I looked among some older posts but I didn't find an answer.
I'm plotting a function of two variables with ContourPlot.
It's something very simple like:

ContourPlot[f(x,y), {x, 0, 1}, {y, 0.01, 0.1},
 ColorFunction -> "LightTemperatureMap",
 FrameLabel -> {.....}]

I'm using the command colorfunction because I'd like Mathematica to
plot the regions where function f(x,y) is smaller with blue and the
densest regions with red. I try to explain my problem: the colors I
get are almost exactly what I want, except for the densest regions,
which are white. How can I color them with red?


Thank you so much for your kind help.
Cheers
Valentina




  • Prev by Date: Re: Generalizing Complement to handle multiple occurrences of elements
  • Next by Date: Re: Extracting some elements, members of another list
  • Previous by thread: Re: Colorfunction in ContourPlot
  • Next by thread: Why Row does not format 2 plots in one row when ImageSize->Full?