Re: Question: determination of greyscale values

*To*: mathgroup at christensen.cybernetics.net*Subject*: [mg1899] Re: [mg1889] Question: determination of greyscale values*From*: Tom Wickham-Jones <twj>*Date*: Mon, 14 Aug 1995 01:45:01 -0400

>How does Mathematica determine which greyscale values correspond to >which numerical values when it does density plots at default settings? >With small matrices, it seems to distribute the greyscale at a >constant gradient between the lowest and highest numbers. However, in >my 40x40matrix, (which has a highest value of 10), I get the same >martix if change the value of one position from 10 to 1000. Is the >setting of the middle of the gradient wighted by the median of the input >data? If so, how? The values passed to the default coloring function (a GrayLevel function) are scaled from the data so that the minimum and maximum values of the z-component of the PlotRange scale to 0 and 1 respectively. In[5]:= DensityPlot[ x y, {x,0,2},{y,0,2}] Out[5]= -DensityGraphics- In[6]:= FullOptions[ %, PlotRange] Out[6]= {{-0.04, 2.04}, {-0.04, 2.04}, {0., 4.}} Thus data value of 0 scales to 0 and data value of 4 scales to 1. If the PlotRange was changed this would change the coloring. Since the default setting of the PlotRange option is Automatic changing one value of an array will not necessarily change the coloring calculations. This is happening to the plot described in the message above. Tom Wickham-Jones WRI