Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #6633
| From | Jacopo Bertolotti <jacopo.bertolotti@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Is it possible to define new color schemes? |
| Date | 2011-11-22 12:25 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jag4b9$76$1@smc.vnet.net> (permalink) |
| References | <201111210928.EAA14782@smc.vnet.net> |
If you happen to know an analytic form that connect a parameter running
between 0 and 1 and the value of your RGB channels you can do something
like this:
phasecolor[x_] := RGBColor[-Cos[x/2] + 1, (-Cos[(\[Pi] + x)^2/(2 \[Pi])]
+ 1)/
2, (-Cos[(\[Pi] - x)^2/(2 \[Pi])] + 1)/2];
DensityPlot[Cos[x y], {x, -5, 5}, {y, -5, 5}, ColorFunction -> phasecolor]
Best
Jacopo
On 11/21/2011 10:28 AM, Darau, M. wrote:
> Hello,
>
> Is it possible to define a new gradient color scheme to use in DensityPlot? If so, how can I do that? I know the RGB of the end colors, and maybe 2-3 intermediate ones.
>
> Thanks,
> Mirela
>
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Is it possible to define new color schemes? Jacopo Bertolotti <jacopo.bertolotti@gmail.com> - 2011-11-22 12:25 +0000
csiph-web