Re: How To invert ColorFunction
- To: mathgroup at smc.vnet.net
- Subject: [mg106725] Re: How To invert ColorFunction
- From: dr DanW <dmaxwarren at gmail.com>
- Date: Fri, 22 Jan 2010 05:36:06 -0500 (EST)
- References: <hj9e1b$k6g$1@smc.vnet.net>
Vladimir, ColorFunction->"Rainbow" is shorthand for ColorFunction -> Function[{x, y, z}, ColorData["Rainbow"][z] where z is the value of the dependent variable scaled to be between 0 and 1. So, to invert the colors, flip the scale to z is scaled to be between 1 and 0: ColorFunction -> Function[{x, y, z}, ColorData["Rainbow"][1 - z]] To learn more, look up ColorFunction, ColorData, ColorDataFunction, and Color Schemes in the Doc Center. Daniel