Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6633 > unrolled thread

Re: Is it possible to define new color schemes?

Started byJacopo Bertolotti <jacopo.bertolotti@gmail.com>
First post2011-11-22 12:25 +0000
Last post2011-11-22 12:25 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Is it possible to define new color schemes? Jacopo Bertolotti <jacopo.bertolotti@gmail.com> - 2011-11-22 12:25 +0000

#6633 — Re: Is it possible to define new color schemes?

FromJacopo Bertolotti <jacopo.bertolotti@gmail.com>
Date2011-11-22 12:25 +0000
SubjectRe: Is it possible to define new color schemes?
Message-ID<jag4b9$76$1@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
>
>

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web