MathGroup Archive 2001

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

Search the Archive

Re: aesthetic ColorFunction for DensityPlots

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27798] Re: [mg27774] aesthetic ColorFunction for DensityPlots
  • From: Adalbert Hanssen <hanssen at zeiss.de>
  • Date: Fri, 16 Mar 2001 04:37:55 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

what about this one:

Bunt[i_]:=
Module[{r1=.40,r2=.8,g1=.45,g2=.75,b1=.15,b2=.65}
      ,Which[i<0,  RGBColor[0, 0,.3]	(* 0,0,.55 *)
            ,i>1,  RGBColor[1,.4,.4]	(* 1,0,0   *)
            ,i===Indeterminate, RGBColor[0,0,0]
            ,True, RGBColor[If[i<r1,0,If[i<r2,(i-r1)/(r2-r1),1]]
	                       ,.9*If[i<g1,i/g1,If[i>g2,1-(i-g2)/(1-g2),1]]
	                       ,If[i<b1,3i+1-3b1,If[i<b2,(i-b2)/(b1-b2),0]]
	                       ]
            ]
      ];			(* Bunt *)

DensityPlot[x*y, {x,-1,1},{y,-1,1}, ColorFunction->Bunt];

regards

Adalbert


  • Prev by Date: page numbers of cells with celltag
  • Next by Date: Re: ReadList query
  • Previous by thread: aesthetic ColorFunction for DensityPlots
  • Next by thread: Re: aesthetic ColorFunction for DensityPlots