MathGroup Archive 2001

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

Search the Archive

Re: Two questions concerning ListDensityPlot ...

  • To: mathgroup at
  • Subject: [mg28517] Re: Two questions concerning ListDensityPlot ...
  • From: "Ersek, Ted R" <ErsekTR at>
  • Date: Tue, 24 Apr 2001 01:48:52 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

Kattnig  wrote,
I'm desperately looking for a color function that allows the intermediate
values to be kept white, while maxima and minima are colored red and blue
respectively with the "color intensity" indicating their absolute value.
Applied to my sparse matrix problem I want the negative entries to be blue,
the positive to be red whereas the majority of entries corresponding to zero
should remain white. 

Use the following matrix as an example.


Are you sure you want to use the same color for 0 and Indeterminate?  Well
if you do replace 
(x==0) with (x==0||x===Indeterminate) below.
This is a case where beauty is in the eye of the beholder.  I think the
following works nicely.

      x>0,If[large==0,Hue[0.0,0.0,1.0],Hue[0.0,0.1+0.7*x/large ,1.0]],
      True, (* Should never get here. *)Abort[] 

    large=Max[Max[lst], 0];
    small=Min[Min[lst], 0];
    ListDensityPlot[ lst, ColorFunction->Shade,

You had another problem with the tick marks.  I could probably solve that
too, but I am running out of time.  Chances are somebody else will give a
solution.  If I don't see a solution after a few days I will look into it.

About visualizing complex functions you could do the following:

   Plot3D[ Abs[ func[a + b I] ],  
         {a,amin,amax},{b,bmin,bmax}, ColorFunction->(Arg[#]/(2*Pi)+1&)   

I forget who it was but somebody had a nice package on a website that did
this sort of thing.

  Ted Ersek

  • Prev by Date: Re: Programming question about multiple assignments in the Coefficients Matrix
  • Next by Date: Re: Algebraic Integers
  • Previous by thread: Two questions concerning ListDensityPlot ...
  • Next by thread: RE: Two questions concerning ListDensityPlot ...