Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Question about ColorFunction

  • To: mathgroup at smc.vnet.net
  • Subject: [mg126608] Re: Question about ColorFunction
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Thu, 24 May 2012 03:32:01 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201205230729.DAA04974@smc.vnet.net>

"With the usual default setting ColorFunctionScaling->True, all
arguments supplied to func are scaled to lie in the range 0 to 1."

In your first example, #1 and #2 are each scaled before being fed to
Sin[#1 + #2]] & so the argument of the Sin is in the interval {0, 2}.
In your second example, the argument of Hue[#3] & is in the interval
{0, 1}. The plots would be identical if you used ColorFunctionScaling
-> False in each.


Bob Hanlon


On Wed, May 23, 2012 at 3:29 AM, Jee Lou <ywdr1987 at gmail.com> wrote:
> Anyone explain to me how ColorFunction works? Why Plot3D[Sin[x + y], {x, 0, 3}, {y, 0, 3},  ColorFunction -> (Hue[Sin[#1 + #2]] &)] and Plot3D[Sin[x + y], {x, 0, 3}, {y, 0, 3}, ColorFunction -> (Hue[#3] &)] return different color distributions?
>



  • Prev by Date: Re: Question about ColorFunction
  • Next by Date: Re: Question about ColorFunction
  • Previous by thread: Re: Question about ColorFunction
  • Next by thread: Re: Question about ColorFunction