Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2003
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

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

Search the Archive

RE: Bug in ColorFunctionScaling ???

  • To: mathgroup at smc.vnet.net
  • Subject: [mg39439] RE: [mg39386] Bug in ColorFunctionScaling ???
  • From: "Wolf, Hartmut" <Hartmut.Wolf at t-systems.com>
  • Date: Sat, 15 Feb 2003 01:42:17 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

>-----Original Message-----
>From: Cesar Guerra [mailto:guerra_cesar at yahoo.com]
To: mathgroup at smc.vnet.net
>Sent: Thursday, February 13, 2003 10:54 AM
>To: mathgroup at smc.vnet.net
>Subject: [mg39439] [mg39386] Bug in ColorFunctionScaling ???
>
>
>
>
>Hi math group
>
>working with the matrix given at the end of this mail I had 
>troubles trying to visualize it. For instance
>
>ListDensityPlot[matrix]
>
>works too bad as can be seen using a 3D chart
>
><<Graphics`Graphics3D` 
>
>BarChart3D[matrix]
>
>I got the correct density plot when I scaled the matrix 
>elements by hand:
>
>min = Min[matrix];
>
>max = Max[matrix];
>
>ListDensityPlot[matrix,ColorFunctionScaling->False,ColorFunctio
>n->(GrayLevel[(#-min)/(max-min)]&)];
>
>The question: is it a bug or I lost something in the way? A 
>similar problem arises with many matrices that I generated in 
>which there are many numbres close to zero.
>
>Regards.. Cesar,
>
>Well here is the matrix. Sorry because of the horrible format
>
[...]
>
>
Cesar,

observe:

In[8]:= dp = ListDensityPlot[matrix];

In[10]:= Cases[Graphics[dp], Raster[_, _, zrange_] :> zrange, Infinity] //
InputForm
Out[10]//InputForm= {{0., 0.00009202801719751475}}

In[11]:= Through[{Min, Max}[matrix]]
Out[11]= {6.532730362808272`*^-22, 0.9373917995816773`}

This is the discrepancy; the suspicion is, this comes from some (mostly)
convenient automatism:

In[13]:= Options[dp, {ColorFunction, ColorFunctionScaling, PlotRange}]
Out[13]= {PlotRange -> Automatic, ColorFunction -> Automatic, 
  ColorFunctionScaling -> True}

Indeed...

In[14]:= ListDensityPlot[matrix, PlotRange -> All];

...gives what you do miss.

--
Hartmut Wolf



  • Prev by Date: Re: Porting Mathematica graphics to MicroSoft Point, with quality
  • Next by Date: RE: Silly Gridbox[] question
  • Previous by thread: RE: Bug in ColorFunctionScaling ???
  • Next by thread: Re: Bug in ColorFunctionScaling ???