Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*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 2004

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

Search the Archive

Re: ListDensityPlot (solution, and critical comment))

  • To: mathgroup at smc.vnet.net
  • Subject: [mg49754] Re: ListDensityPlot (solution, and critical comment))
  • From: AES/newspost <siegman at stanford.edu>
  • Date: Fri, 30 Jul 2004 06:02:07 -0400 (EDT)
  • References: <cear75$asf$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

> I'm trying to show some rectangular arrays in two ways by creating 
> side-by-side ListPlot3D and ListDensityPlot displays in a GraphicsArray.
> 
> Each of the arrays contains a primary "mountain peak" that arises out of 
> a flat plane at a base elevation close to zero, plus several secondary 
> hillocks only 1/3 to 1/2 as high as the main peak -- and that's how they 
> show up in the ListPlot3D,
> 
> In the ListDensityPlot, however, using the standard ColorFunction->Hue, 
> the tops of some of the secondary hillocks show up in the same bright 
> red as the top of the main peak, even though they appear in the 
> ListPlot3D to be less than 1/2 as high as the main peak.  It's as if 
> ColorFunctionScaling is being applied locally to each individual peak 
> somehow.
> 
> What might be going on here?  


Answering my own question on this:  Adding PlotRange->All as an option 
to ListDensityPlot makes it function as it should.

But, some further, and critical, commentary:  Seems to me this should be 
the _default_ for this function.

If you make a Plot3D or ListPlot3D and the function goes off scale in 
the z direction, you can tell this from the plot: the peaks that go off 
scale are visibly cut off, have an obviously truncated or chopped-off 
flat top, where they protrude through the top of the box.  You receive a 
visible warning.

With ListDensityPlot, this is not nearly so obvious -- you don't get 
nearly as obvious a visual indication that the plot has been truncated.  
I would never have realized it was happening if I didn't have the 
ListPlot3D and ListDensityPlot side by side.

Further, haven't rechecked this, but I believe the Help for 
ListDensityPlot says ColorFunctionScaling->True is the default.  My 
arrays were not unusual -- didn't have any wild outliers, just a central 
tallest gaussian-like "big peak" covering 10% to 15% of the plot area, 
with some lower (i.e., 30% to 50% of peak height) secondary peaks around 
it.  Default conditions for ListDensityPlot should have scaled and 
handled them properly.  Instead, it brought the secondary peaks up to 
full scale (they would have been perfectly visible without doing this), 
and truncated the "big peak" with no warning.  Not good.

(By the way, this is Mac OS 9.2, Mathematica 4.2.0.)


  • Prev by Date: Re: Speed of repeated matrix calculation
  • Next by Date: Re: RE: Combinations
  • Previous by thread: Re: Question on Compile[]
  • Next by thread: Re: ListDensityPlot (solution, and critical comment))