aesthetic ColorFunction for DensityPlots
- To: mathgroup at smc.vnet.net
- Subject: [mg27774] aesthetic ColorFunction for DensityPlots
- From: Daniel Reeves <dreeves at eecs.umich.edu>
- Date: Wed, 14 Mar 2001 04:07:29 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Setting ColorFunction->Hue makes for pretty density plots but it makes both really low and really high areas red; I'd like to distinguish between them. Here is how I solved that problem: ColorFunction -> (Hue[-.83 # + .67]&) It uses deep blue for low regions and bright pink for highest regions. If others have played with aesthetically pleasing ColorFunctions, I'd love to hear your thoughts, experiences, improvements to the above... Here is a little code snippet I used to experiment: m = -.83; c = .67; n = 30; ListDensityPlot[{Range[0, n], Table[Mod[i, 2]*n, {i, 0, n}]}, Mesh -> False, ColorFunction -> (Hue[m # + c]&)]; (* top row alternates between lowest and highest regions; bottom row goes from lowest (left) to highest (right) *) Thanks! Daniel -- -- -- -- -- -- -- -- -- -- -- -- Daniel Reeves http://ai.eecs.umich.edu/people/dreeves/ "That must be wonderful! I don't understand it at all."