[Thread Prev][Thread Next][Index]

Re: [ferret_users] color palette with non-monotonic levels/ specify levels



Great, thanks Billy.

For others' information, this works:

Create .spk file with this content:
RGB_Mapping By_value

-60  0  10  30
-50  0  15  35
-40  0  20  40
-30  0  35  70
-20  0  50  100
-17.5 22.5 60 100
-16.25 45  70  100
-15 67.5 80 100
-13.75 90  90  100
-12.5 93.5 93.5 100
-11.25 97 97 100
-10 98.5 97 98.5
-8.75 100 97 97
-7.5 100 93.5 93.5
-6.25 100 90 90
-5 100 67.5 67.5
-3.75 100 45 45
-2.5 100 22.5 22.5
-1.25 100 0 0
0 70  0 0
1.25 40  0 0

Then, in ferret:
def sym clev "(-17.5,1.25,1.25,15)(-60,-20,10,5)"
fill/lev=($clev)/pal=custom_palette VAR


On Mon, Apr 16, 2018 at 12:43 PM, William Kessler <william.s.kessler@xxxxxxxx> wrote:
You need RGB_Mapping By_Value. Here's an example off-centered blue-to-red spk file, where the numbers in the left column are in data units, and the next 3 columns are the RGB values:

RGB_Mapping By_value
-20 20 20 100
-2 85 85 85
1 85 85 85
42 100 20 20

Call this in the usual way in a SHADE or FILL command:

def sym clev "(-20,42,2,-1)dark(-10,40,10)del(0)"
fill/lev=($clev) MY_Variable

And search the manual for RGB_Mapping

Billy

> On Apr 16, 2018, at 7:53 AM, Paul Goddard <goddarpb@xxxxxxxxx> wrote:
>
> Hello,
>
> I'd like to create a color palette that has non-monotonic levels and be able to specify the level and color at each level.  I attached a figure from Nusbaumer et al. 2017 which gives an example of exactly what I would like to do.
>
> The blue_red_centered.spk has the correct colors... but the best method I could do to replicate the Nusbaumer figure is using level=20H. 
>
> Thanks for the help!
>
> Paul Goddard
> <Nusbaumer_2017_Fig4a.JPG>




[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement