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: [mg29003] RE: [mg28965] ColorFunction for ListPlot3D, ListContourPlot or ListDensityPlot ?
  • From: "David Park" <djmp at earthlink.net>
  • Date: Thu, 24 May 2001 04:07:26 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

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/

> From: Joerg Christoffers [mailto:Joerg.Christoffers at Philips.com]
To: mathgroup at smc.vnet.net
>
> Dear NewsGroup !
>
> I have a list of data. Maybe it is not important but the data represents
> measuring values on a 6" silicon wafer. The chips on the slice
> have an x and
> y coordinate and each chip gives a special voltage as value.
> I now would like to visualize the values over the wafer coordinates.
> My list looks like this:
>
> mylist = {{Ux1y1, Ux2y1, Ux3y1,...Ux50y1},{Ux1y2, Ux2y2,
> Ux3y2,...Ux50y2},{Ux1y3, Ux2y3, Ux3y3,...Ux50y3},...,{Ux1y50, Ux2y50,
> Ux3y50,...Ux50y50}}
>
> where Ux1y1 means the voltage of the chip on wafer position x=1 y=1. The
> voltage should be used as the z value for the 3D plot. In other words I
> could use one of these functions for visualization:
>
> ListPlot3D[]
> ListContourPlot[]
> ListDensityPlot[]
>
> My question: How do I get good looking color fades ?
> E.g. from dark brown over yellow to green (like a terrain map) or
> from red over yellow to green or
> the full spectrum from infrared to ultraviolet ?
>
> Of course I tried e.g. ListDensityPlot[mylist, Mesh -> False,
> ColorFunction -> (RGBColor[Mod[#, 1], 0, 0] &)]
>
> But I don't know how (and in which order) to modify the RGB
> values to get a
> nice fade. I would like to have an algorithm that gets the minimum and
> maximum value of my data, counts the number of values in the
> list, and then
> does an optimal scaling of the desired color range.
>
> Best regards,
> Joerg.Christoffers at Philips.com
>




  • Prev by Date: Re: Help fitting Exponential curves
  • Next by Date: Re: ColorFunction for ListPlot3D, ListContourPlot or ListDensityPlot ?
  • Previous by thread: Re: ColorFunction for ListPlot3D, ListContourPlot or ListDensityPlot ?
  • Next by thread: Re: ColorFunction for ListPlot3D, ListContourPlot or ListDensityPlot ?