[Thread Prev][Thread Next][Index]

Re: [ferret_users] inverting cmocean color bar



Thank you, Gert and Ryo for sharing the files and the command to invert it. I found PyFerret have cmocean color bars but recently cmocean have included more color palettes which are not in the PyFerret yet. So I was thinking to play with the cmocean color palettes and make the new additions compatible to PyFerret. I tried that but failed. May I know what are the steps to convert cmocean color palettes to pyferret compatible .spk file?

here is the link for the ferret spk files and the cmocean developer rgb files.

https://github.com/NOAA-PMEL/Ferret/tree/master/palettes

https://github.com/matplotlib/cmocean/tree/master/cmocean/rgb

cheers, saurabh


On Thu, Mar 5, 2020 at 2:31 PM Ryo Furue <furue@xxxxxxxxxx> wrote:
Hi Saurabh,

On Thu, Mar 5, 2020 at 9:29 AM saurabh rathore <rohitsrb2020@xxxxxxxxx> wrote:

I am using cmocean color bar and I like to plot the color bar in reverse direction means upside down. I tried a lot using Matlab also to flip it upside down but unsuccessful and too much of time-consuming. So is it possible to invert the colour the cmocean color bar like blue_orange to orange_blue?


I'm attaching my script which does that.

$ ruby ferret-invert-spk.rb your-rainbow.spk my-grayscale.spk . . .

I hope it works for you.

Cheers,
Ryo


--


REGARDS

Saurabh Rathore
Research Scholar (PhD.)
Centre For Oceans, Rivers, Atmosphere & Land Science Technology
Indian Institute Of Technology, Kharagpur
contact :- 91- 8345984434

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

Privacy Policy | Disclaimer | Accessibility Statement