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: [mg28977] Re: [mg28965] ColorFunction for ListPlot3D, ListContourPlot or ListDensityPlot ?
  • From: maarten.vanderburgt at icos.be
  • Date: Thu, 24 May 2001 04:06:54 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Joerg,

The function pseudo below gives a nice result. It goes from black, purple,
blue, green, red, yellow to white for it's argument going from 0 to 1.

In[46]:= pseudo[x_] :=
  RGBColor @@
    Which[
      0 <= x < 0.10196078431372549`, {4.884615` x, 0.`, 4.903846` x},
      0.10196078431372549` <= x < 0.20392156862745098`,
{0.9960783529411765` - 4.884615` x, 0.`, 4.903846` x},
      0.20392156862745098` <= x < 0.403921568627451`, {0.`,
-1.0196078431372548` + 5.` x, 2.019607843137255`- 5.` x},
      0.403921568627451` <= x < 0.6039215686274509`, {-2.019607843137255` +
5.` x, 3.019607843137255` - 5.` x, 0.`},
      0.6039215686274509` <= x < 0.803921568627451`, {1.`,
-3.019607843137255` + 5.` x, 0.`},
      0.803921568627451` <= x <= 1., {1.`, 1.`, -4.1` + 5.1` x}
   ]
In[47]:= pseudo[1]
         pseudo[0.5]
         pseudo[0]
Out[47]= RGBColor[1., 1., 1.]
Out[48]= RGBColor[0.480392, 0.519608, 0.]
Out[49]= RGBColor[0, 0., 0]

In[50]:= voltages = Table[Sin[i j/125] + 0.5  Random[], {i, 1, 50}, {j, 1,
50}];
In[51]:= min = Min[voltages];
         max = Max[voltages];

In[53]:= ListDensityPlot[voltages, ColorFunction -> (pseudo[#] &),
         PlotRange -> {min, max}, Mesh -> False];

Maarten van der Burgt





"Joerg Christoffers" <Joerg.Christoffers at Philips.com> on 23-05-2001
07:54:31 AM
cc:
Subject: [mg28977]  [mg28965] ColorFunction for ListPlot3D, ListContourPlot or
ListDensityPlot ?


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: ColorFunction for ListPlot3D, ListContourPlot or ListDensityPlot ?
  • Next by Date: Left-hand Sum, etc?
  • Previous by thread: RE: ColorFunction for ListPlot3D, ListContourPlot or ListDensityPlot ?
  • Next by thread: Re: ColorFunction for ListPlot3D, ListContourPlot or ListDensityPlot ?