Re: ColorFunction and question about how to use it
- To: mathgroup at smc.vnet.net
 - Subject: [mg101668] Re: [mg101635] ColorFunction and question about how to use it
 - From: "Kurt TeKolste" <ekt at fastmail.net>
 - Date: Tue, 14 Jul 2009 05:33:18 -0400 (EDT)
 - References: <200907120949.FAA16148@smc.vnet.net>
 - Reply-to: ekt at fastmail.net
 
Sorry, but you're going to be embarrassed by this one:
Correct the syntax from:
Plot3D[x + y, {x, -2, 2}, {y, -2, 1}, ColorFunction -> Function[{x, y,
z} -> Hue[z]]]
to
Plot3D[x + y, {x, -2, 2}, {y, -2, 1}, ColorFunction -> Function[{x, y,
z} , Hue[z]]]
You will see the expected rainbow of color
Kurt TeKolste
On Sun, 12 Jul 2009 01:49 -0400, "David"
<david.b.a.epstein at googlemail.com> wrote:
> Here is some Mathematica code
> 
> In[1]:= Options[Plot3D]
> 
> Out[1]= {AlignmentPoint -> Center, AspectRatio -> Automatic,
>  Axes -> True, AxesEdge -> Automatic, AxesLabel -> None,
>  AxesOrigin -> Automatic, AxesStyle -> {}, Background -> None,
>  BaselinePosition -> Automatic, BaseStyle -> {},
>  BoundaryStyle -> GrayLevel[0], Boxed -> True,
>  BoxRatios -> {1, 1, 0.4}, BoxStyle -> {}, ClippingStyle -> Automatic,
>   ColorFunction -> Automatic, ColorFunctionScaling -> True,
>  ColorOutput -> Automatic, ContentSelectable -> Automatic,
>  ControllerLinking -> Automatic, ControllerMethod -> Automatic,
>  ControllerPath -> Automatic, CoordinatesToolOptions -> Automatic,
>  DisplayFunction :> $DisplayFunction, Epilog -> {},
>  Evaluated -> Automatic, EvaluationMonitor -> None,
>  Exclusions -> Automatic, ExclusionsStyle -> None, FaceGrids -> None,
>  FaceGridsStyle -> {}, Filling -> None, FillingStyle -> Opacity[0.5],
>  FormatType :> TraditionalForm, ImageMargins -> 0.,
>  ImagePadding -> All, ImageSize -> Automatic, LabelStyle -> {},
>  Lighting -> Automatic, MaxRecursion -> Automatic, Mesh -> Automatic,
>  MeshFunctions -> {#1 &, #2 &}, MeshShading -> None,
>  MeshStyle -> Automatic, Method -> Automatic,
>  NormalsFunction -> Automatic, PerformanceGoal :> $PerformanceGoal,
>  PlotLabel -> None, PlotPoints -> Automatic,
>  PlotRange -> {Full, Full, Automatic}, PlotRangePadding -> Automatic,
>  PlotRegion -> Automatic, PlotStyle -> Automatic,
>  PreserveImageOptions -> Automatic, Prolog -> {},
>  RegionFunction -> (True &), RotationAction -> "Fit",
>  SphericalRegion -> False, Ticks -> Automatic, TicksStyle -> {},
>  ViewAngle -> Automatic, ViewCenter -> Automatic,
>  ViewMatrix -> Automatic, ViewPoint -> {1.3, -2.4, 2.},
>  ViewRange -> All, ViewVector -> Automatic, ViewVertical -> {0, 0, 1},
>   WorkingPrecision -> MachinePrecision}
> 
> 
> In[2]:=
> Plot3D[x + y, {x, -2, 2}, {y, -2, 1},
>  ColorFunction -> Function[{x, y, z} -> Hue[z]]]
> 
> Plot3D[x + y, {x, -2, 2}, {y, -2, 1}]
> -----------------------------------------------------------------------------
> The first Plot3D command gives me only black and white. Why is that?
> Otherwise it looks fine.
> The second Plot3D command gives me the graph in a uniform blue. Why is
> that? Apart from the colour, the two graphs look the same.
> 
> What I am actually trying to do is more complicated, but I need to
> understand the simplest situations first: I have a given real valued
> function f of two variables. I can show that there are exactly two
> {x,y} locations at which the two partial derivatives of f are
> simultaneously zero. I would like to demonstrate this through Plot3D,
> for example by plotting the sum of the squares of the two partial
> derivatives. The function surface should be mostly transparent, but
> the surface would be coloured (say red) whenever the sum of squares
> lies in the closed interval [0,epsilon], with the value of the
> positive number epsilon under user control. Transparency would enable
> one to see the zeros even if the surface is in the way.
> 
> My many attempts to achieve this have all failed.
> 
> Thanks for any help.
> 
> David
> 
-- 
  Kurt
  ekt at fastmail.net
- References:
- ColorFunction and question about how to use it
- From: David <david.b.a.epstein@googlemail.com>
 
 
 - ColorFunction and question about how to use it