|
[Date Index]
[Thread Index]
[Author Index]
ContourPlot ColorFunction workaround
- To: mathgroup at smc.vnet.net
- Subject: [mg123117] ContourPlot ColorFunction workaround
- From: Chris Young <cy56 at comcast.net>
- Date: Thu, 24 Nov 2011 06:53:50 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
It seems to me that the ColorFunction for the 2D ContourPlot always
starts from 0 when it does scaling, whereas the one for ContourPlot3D
scales the whole range of values of the function.
At any rate, setting ColorFunctionScaling to False and then adjusting
the range of values to run from 0 (red) to 0.4 (green) got me what I
was after, red for negative values and green for positive.
http://home.comcast.net/~cy56/ContourPlot%20fixed.png
Manipulate[
ContourPlot[
Sin[x y], {x, -2 =CF=80, 2 =CF=80}, {y, -2 =CF=80, 2 =CF=80},
Contours -> n,
ContourStyle -> None,
ColorFunctionScaling -> False,
ColorFunction -> (Hue[0.4 (# + 1)/2, 0.5, 1] &)
],
{{n, 8}, 0, 32, 1}
]
Prev by Date:
Re: Sorting strings
Next by Date:
Forcing Certain Algebraic Forms With FullSimplify
Previous by thread:
Re: bug
Next by thread:
Forcing Certain Algebraic Forms With FullSimplify
|