MathGroup Archive 1995

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

Search the Archive

Re: color function for ContourPlot


> Producing a contor plot using ColorFunction->Hue gives the same color for  
the 
> lowest as for the highest regions in the plot whic his rather confusing.The 
> same problem is encountered when making a surface graphics with 
> ColorFunction->Hue. In the latter case creating an module like the  
following
> one
> solves the problem:
> 
> 	rainbowColor[array_, label_] :=
>    		Module[
>           		{min, max, length},
>           		min = Min[array];
>           		max = Max[array];
>           		length = Length[array[[1]]];
>           		ListPlot3D[array,
>                      		 
Table[Hue[1./(1.1*(max-min))*array[[i]][[j]]],
>                            		{i, length-1},
>                            		{j, length-1}]
>                    		  ]
>       		      ]


Hello Fredo,

This doesn't answer your question, but I think you'll find it useful
anyway.  When I was browsing through MathSource one time, I happened
upon a neat little package called GradientColor.m (by Jeff Adams) that
makes it more convenient to set up a color that varies through a set
of colors.  Point your web browser at

http://www.wri.com/MathSource/.aliases/0206-176/GradientColor.m

Or use the email interface to fetch item 0206-176.


Best regards,

Robby Villegas


  • Prev by Date: Re: Pasting Mathematica notebooks into Word
  • Next by Date: Re: In[1]:= Question
  • Previous by thread: color function for ContourPlot
  • Next by thread: Re: color function for ContourPlot