Re: Showing a limited GrayLevel
- To: mathgroup at smc.vnet.net
- Subject: [mg19116] Re: [mg18977] Showing a limited GrayLevel
- From: Russell Towle <rustybel at foothill.net>
- Date: Thu, 5 Aug 1999 01:35:33 -0400
- Sender: owner-wri-mathgroup at wolfram.com
> I have a quick question about changing the GrayLevel in contour plots. > > When using ContourPlot, how is it possible to limit the GrayLevel range? >That is, instead of GrayLevel being scaled between 0 and 1, the contours >would be shown between 0.5 and 1 cutting out any totally black parts of the >plot. Steve, try this: a=.5 (*set lower limit of gray level*) ContourPlot[Sin[x y],{x,-2,2},{y,-2,2}, ColorFunction->(GrayLevel[(#+a)/(1+a)]&)]; and this: (*use rgb colors*) ContourPlot[Sin[x y],{x,-2,2},{y,-2,2}, ColorFunction->(RGBColor[#,#,1-#]&)]; Russell Towle Box 141 Dutch Flat, CA 95714 (530) 389-2872