Re: color function for ContourPlot
- To: mathgroup at christensen.cybernetics.net
- Subject: [mg1095] Re: color function for ContourPlot
- From: villegas (Robert Villegas)
- Date: Sun, 14 May 1995 21:51:33 -0400
- Organization: Wolfram Research, Inc.
> 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