MathGroup Archive 2008

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

Search the Archive

ContourPlot and ColorFunction Opacity

  • To: mathgroup at
  • Subject: [mg93714] ContourPlot and ColorFunction Opacity
  • From: alpinekarst <alpinekarst at>
  • Date: Mon, 24 Nov 2008 04:10:51 -0500 (EST)

Dear All,

I am hoping that one of the Gurus here can help me figure out how to
adjust the opacity for a ContourPlot ColorFunction in Mathematica 6.0.3

say for example I have a 2D ContourPlot plot such as:

ContourPlot[Cos[x y], {x, -Pi, Pi}, {y, -Pi, Pi},
 GridLines -> Automatic,
 RegionFunction -> Function[{x, y, z}, Pi < x^3 + y^3 < Pi^3],
 BoundaryStyle -> Red, ColorFunction -> "TemperatureMap"]

How can I adjust the Opacity of the filled region so that the
gridlines are somewhat visible within the boundary defined by the
RegionFunction?  Using a constant would be fine or even better some
generic decay function from the centroid of the region.

I have tried defining the opacity in the color function multiple ways
such as:
{Directive[Opacity[0.5]], ColorData["TemperatureMap"][#1] &}
but keep getting BoxForm and Graphics Directive errors.

I'm thinking of resorting to replacement rules against AbsoluteOptions
but that's bound to get ugly and I am hoping that there is a better
way? This is probably quite simple...but not for me today.


  • Prev by Date: Re: pass by reference
  • Next by Date: Primed Symbols in Mathematica
  • Previous by thread: Re: A query regarding polytope's faces and vertices
  • Next by thread: RE : [mg93714] ContourPlot and ColorFunction Opaci