Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

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

Search the Archive

Re: Fill the space surrounded by two contours lines with different colors

  • To: mathgroup at smc.vnet.net
  • Subject: [mg36434] Re: Fill the space surrounded by two contours lines with different colors
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Sat, 7 Sep 2002 02:53:40 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <al9l7i$b1l$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

gr = ContourPlot[x^2 + y^2, {x, -1, 1}, {y, -1, 1}, 
  Contours -> {0.2, 0.4}, 
  ColorFunction -> (If[# >= 0.2 && # <= 0.4, 
                      RGBColor[1, 0, 0], 
                      RGBColor[1, 1, 1]] &), 
  ColorFunctionScaling -> False
 ]

Regards
  Jens

Jun Lin wrote:
> 
> I need to fill the space between two contour lines, C1 and C2, with
> red color, and leave the other place white. What trick I have to use?
> Any suggestion and advice will be appreciated.
> 
> Jun Lin


  • Prev by Date: Re: Coefficient problem
  • Next by Date: Re: non zero result after multiplying with zero.
  • Previous by thread: Re: Fill the space surrounded by two contours lines with different colors
  • Next by thread: Re: Fill the space surrounded by two contours lines with different colors