Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2001

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

Search the Archive

Re: ColorFunction for ListPlot3D, ListContourPlot or ListDensityPlot ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg29048] Re: ColorFunction for ListPlot3D, ListContourPlot or ListDensityPlot ?
  • From: "John Jowett" <John.Jowett at cern.ch>
  • Date: Sat, 26 May 2001 21:53:38 -0400 (EDT)
  • Organization: CERN
  • References: <oplP6.3625$8I3.14298@ralph.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

David,
    It  may be worth remarking that your function is even more useful
(without modification!) if you first load the standard package

<<Graphics`Colors`

Then you can mix ways of specifying colours to your heart's content, e.g.,

blend =ColorMix[BurntSienna,CMYKColor[1,..8,0]]

Plot3D[Sin[x+3 y-Random[]],{x,0,4},{y,0,3},ColorFunction->blend]

John Jowett

"David Park" <djmp at earthlink.net> wrote in message
news:oplP6.3625$8I3.14298 at ralph.vnet.net...
> Joerg,
>
> Here is a ColorMix function for blending two colors. (I think that Bob
> Hanlon had a similar routine posted a few days ago.)
>
> ColorMix[color1_, color2_][z_] :=
>   Module[{c1, c2},
>     c1 = List @@ color1;
>     c2 = List @@ color2;
>     RGBColor @@ ((1 - z)c1 + z c2)]
>
> Here, I make a contour plot that shades from brown to green. I picked the
> colors off the color selector in the menu.
>
> ContourPlot[Sin[x*y], {x, -Pi/2, Pi/2},
>    {y, -Pi/2, Pi/2}, PlotPoints -> 30, Contours -> 10,
>    ContourLines -> False, ColorFunction ->
>     ColorMix[RGBColor[0.867201, 0.660166, 0.312505],
>      RGBColor[0.265629, 0.398444, 0.101564]]];
>
> David Park
> djmp at earthlink.net
> http://home.earthlink.net/~djmp/
>




  • Prev by Date: Re: Converting from string to integer and back
  • Next by Date: Re: Converting from string to integer and back
  • Previous by thread: Re: ColorFunction for ListPlot3D, ListContourPlot or ListDensityPlot ?
  • Next by thread: RE: Re: ColorFunction for ListPlot3D, ListContourPlot or ListDensityPlot ?