MathGroup Archive 2007

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

Search the Archive

Re: DensityPlot colours misbehaving

  • To: mathgroup at smc.vnet.net
  • Subject: [mg78728] Re: DensityPlot colours misbehaving
  • From: "David Park" <djmpark at comcast.net>
  • Date: Sun, 8 Jul 2007 06:04:19 -0400 (EDT)
  • References: <f6npct$6rp$1@smc.vnet.net>

It seems to be that this is a bug because Mathematica is somehow clipping 
the 'z' PlotRange. If we specify Full or All the plot behaves properly.

DensityPlot[Exp[-x-y],{x,0.,4.},{y,0.,4.},ColorFunctionScaling->False,
PlotRange->Full]

I think that Version 6 should be christened the Purple Edition since that is 
now the default color for single hue plot elements.

-- 
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/


"Tim Birks" <pystab at hotmail.com> wrote in message 
news:f6npct$6rp$1 at smc.vnet.net...
>
> I have Mathematica v6 and am running code that worked fine with v5. OS is
> Windows XP. Here's a particularly annoying unexplained difference between
> the two versions.
>
> DensityPlot[Exp[-x], {x, 0., 4.}, {y, 0., 4.}, ColorFunctionScaling ->
> False]
>
> behaves as expected, giving a nice gradual horizontal grading of colour 
> from
> white on the left to blue/violet on the right.
>
> In contrast,
>
> DensityPlot[Exp[-x - y], {x, 0., 4.}, {y, 0., 4.}, ColorFunctionScaling ->
> False]
>
> which should give a similar grading from lower-left to upper-right, 
> instead
> gives a mostly blue/violet field with a pure white triangular wedge in the
> lower-left corner. The discontinuous jump between the two occurs roughly
> where x+y=1.4.
>
> Re-plotting with x and y running from 0 to 2 instead of 4 makes the white
> triangle appear smaller rather than bigger. Note the setting of
> ColorFunctionScaling means that the colour at a particular point (x,y)
> shouldn't depend on what's happening elsewhere; also note that the 
> functions
> plotted are very simple, well-behaved and evaluate to between 0 and 1 in 
> the
> ranges plotted.
>
> Can anyone please explain what is happening, how it can be fixed, and why 
> it
> is not a bug?
>
> Apologies if this has been asked before. I have searched the posts 
> available
> on my news reader and found nothing relevant.
>
> T.
>
>
> 



  • Prev by Date: Re: Mathematica 6.0.1 Now Available
  • Next by Date: Re: Why does this happen?
  • Previous by thread: Re: DensityPlot colours misbehaving
  • Next by thread: LocatorPane: turn off "direct any click to nearest locator"?