MathGroup Archive 2010

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

Search the Archive

Re: Colorfunction in ContourPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg112437] Re: Colorfunction in ContourPlot
  • From: "David Park" <djmpark at comcast.net>
  • Date: Wed, 15 Sep 2010 04:40:58 -0400 (EDT)

It is probably for the following reason.

ContourPlot may seem like a 2-dimensional plot but internally it is actually
a 3-dimensional plot with the third dimension, z, being the values of the
function f. Mathematica automatically picks a domain, or PlotRange, for z
that it thinks will display the "interesting" part of the function. This,
however, may not include all that you want and the result is that part of
the area will be uncolored.

The solution is to include the plot option:

PlotRange -> {fmin, fmax}  such that it will include the entire range of f
values for which you want contours.

As an alternative, I think you could also specifically specify the desired
list of contour values.


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


From: Eamane [mailto:ntina.86 at libero.it] 

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: How does Mathematica create contour plots (or density plots)?
  • Next by Date: New Version 3 Presentations
  • Previous by thread: Re: Colorfunction in ContourPlot
  • Next by thread: Re: Colorfunction in ContourPlot