Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #10191
| From | JiHui Lou <ywdr1987@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Question about ColorFunction |
| Date | 2012-05-24 07:34 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jpko9g$eme$1@smc.vnet.net> (permalink) |
| References | <201205230729.DAA04974@smc.vnet.net> <CAEtRDSek1t-SUaz6uKPgEsZpJLWpLnOxEomcO-NiF_wVbW3EVw@mail.gmail.com> |
Thx for replying.
But when option ColorFunctionScaling->False is added in both, the plots are
still different if u check them carefully...
As you remind me, "With the usual default setting
ColorFunctionScaling->True, all arguments supplied to func are scaled to
lie in the range 0 to 1." is helpful and inspiring. As a result, I have
tried Plot3D[Sin[x + y], {x, 0, 3}, {y, 0, 3}, ColorFunction ->
(Hue[Sin[Pi (#1 + #2)]] &)] to get the same plot as Plot3D[Sin[x + y], {x,
0, 3}, {y, 0, 3}, ColorFunction -> (Hue[#3] &)] produce, but unfortunately
they are still different.
So would u be so kind to help me find a way to make the same plot
as Plot3D[Sin[x + y], {x, 0, 3}, {y, 0, 3}, ColorFunction -> (Hue[#3] &)]
without using ColorFunction form Hue[#3]& but with other form including #1
and #2 ?
Thx a lot!
*=C2=A5=BC=AA=BB=D4 *=BE=B4=C9=CF From Jee Lou
*Jee Lou* *Student, Major: Physics, Zhejiang Normal University, Jinhua,
P.R.China*
On Wed, May 23, 2012 at 9:23 PM, Bob Hanlon <hanlonr357@gmail.com> wrote:
> "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@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?
> >
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Question about ColorFunction JiHui Lou <ywdr1987@gmail.com> - 2012-05-24 07:34 +0000
csiph-web