[Thread Prev][Thread Next][Index]

Re: [ferret_users] Palette



Hi Angela,

If your original palette is, say, blue_darkred

use levitus_climatology
shade/pal=blue_darkred temp[k=1]

then darkred_blue is the reversed palette

shade/pal=darkred_blue temp[k=1]

All palette files are in $FER_DIR/ppl, please compare blue_darkred.spk and darkred_blue.spk to see how they differ. Not all palettes are in pairs. But you can always create your own reversed palettes. For example, the Ferret default is rainbow.spk:

$ cat rainbow.spk
   0.0   80.0    0.0  100.0
  10.0   30.0   20.0  100.0
  33.0    0.0   60.0   30.0
  66.0  100.0  100.0    0.0
  90.0  100.0    0.0    0.0
 100.0   60.0    0.0    0.0

You can create a reversed rainbow by flipping it round

$ cat inverse_rainbow.spk
   0.0   60.0    0.0    0.0
  10.0  100.0    0.0    0.0
  33.0  100.0  100.0    0.0
  66.0  0.0   60.0   30.0
  90.0  30.0   20.0  100.0
 100.0 80.0    0.0  100.0

then use

shade/pal=inverse_rainbow temp[k=1]

More palette tweaks can be found in the list archive.

HTH,
David

AV Gallego-Sala wrote:
Hi!

I would be very grateful if somebody could help me.

I would like to know if there is an easy way to invert the default palette
used in plots. I am using the shade command for a variable that goes from
-5 to +5, and I would like negative numbers to be in the red spectrum and
positive numbers to be in the blue spectrum (the opposite of what it is
now).

Thank you very much,
Angela

--
Daiwei Wang
Department of Earth and Environmental Sciences and
Lamont-Doherty Earth Observatory
Columbia University



[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement