MathGroup Archive 2009

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

Search the Archive

Re: ColorFunction and question about how to use it

  • To: mathgroup at smc.vnet.net
  • Subject: [mg101660] Re: ColorFunction and question about how to use it
  • From: Helen Read <hpr at together.net>
  • Date: Tue, 14 Jul 2009 05:31:36 -0400 (EDT)
  • References: <h3cbe2$fkn$1@smc.vnet.net>
  • Reply-to: HPR <read at math.uvm.edu>

David wrote:
> 
> 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?

Because you don't have the proper syntax. If you look up ColorFunction 
in the Documentation, the very first example will show you how to do it.

Plot3D[x + y, {x, -2, 2}, {y, -2, 1},
  ColorFunction -> Function[{x, y, z}, Hue[z]]]


-- 
Helen Read
University of Vermont


  • Prev by Date: Manipulate[] eval hold until all controls are changed?
  • Next by Date: Re: NDSolve problem
  • Previous by thread: Re: ColorFunction and question about how to use it
  • Next by thread: Re: ColorFunction and question about how to use it