MathGroup Archive 2010

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

Search the Archive

Re: Documentation on (Color) Blend

  • To: mathgroup at smc.vnet.net
  • Subject: [mg111274] Re: Documentation on (Color) Blend
  • From: Ryan Gorka <rgorka at gmail.com>
  • Date: Mon, 26 Jul 2010 06:35:59 -0400 (EDT)

Patrick and David:

Thanks for the help. Once I generate something I like, such as

DensityPlot[x, {x, -1, 1}, {y, 0, 1}, FrameTicks -> None,
 ColorFunction -> (Blend[{{0, Green}, {0.4, White}, {0.6, White}, {1,
      Red}}, #] &)]

Do you have any suggestions for the best way (or at least a reasonable way)
to pick a range of x colors from that? I'll probably start with a linear
sampling, although non-linear samplings also interest me---my main goal is
to avoid injecting 'lie factor' via coloring in my diagrams, so any wisdom
you can impart is appreciated. BTW, are there any Edward Tufte fans in here?

I suppose for now I can just use //InputForm, Part[] and go digging for RGB
values.

-RG

On Sun, Jul 25, 2010 at 7:04 PM, Patrick Scheibe <
pscheibe at trm.uni-leipzig.de> wrote:

> Hi,
>
> you don't need the (buggy) sample with the Table. Just read a bit in the
> Blend documentation and eventually do something like
>
> DensityPlot[x, {x, -1, 1}, {y, 0, 1}, FrameTicks -> None,
>  ColorFunction -> (Blend[{{0, Green}, {0.4, White}, {0.6, White}, {1,
>       Red}}, #] &)]
>
> Cheers
> Patrick
>
> On Sun, 2010-07-25 at 01:58 -0400, telefunkenvf14 wrote:
> > Group:
> >
> > The documentation on Blend[], in the "Possible Issues" section,
> > contains the following example.
> >
> >  ----------------
> > In plot functions, use ColorFunctionScaling to control global scaling
> > of variables:
> >
> > Table[DensityPlot[x, {x, -2, 3}, {y, 0, 1}, FrameTicks -> None,
> >   ColorFunction -> (Blend[{Red, Green}, #] &),
> >   ColorFunctionScaling -> t], {t, {False, True}}]
> >  ----------------
> >
> > I noticed that when I evaluate the code, the original output is not
> > reproduced. On my machine the new plots look exactly the same.
> > (Windows 7, 64-bit, Mathematica 7.0.1)
> >
> > Can someone offer a fix? My goal is to generate a Green to White to
> > Red spectrum with a 'fuzzier' center; eventually I'll use this for
> > coloring a map.
> >
> > -RG
> >
>
>


  • Prev by Date: Re: A Question About Directive [off-topic]
  • Next by Date: Re: Kolmogorov-Smirnov 2-sample test
  • Previous by thread: Re: Documentation on (Color) Blend
  • Next by thread: Re: Documentation on (Color) Blend