[ncl-talk] replace part of colormap
Marston Johnston
shejo284 at gmail.com
Fri Jun 2 10:55:07 MDT 2017
Hi Mary,
This was exactly what I was looking for. Thank you!
/M
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Marston S. Johnston, PhD
Department of Earth Sciences
University of Gothenburg, Sweden
Email: marston.johnston at gu.se
SkypeID: marston.johnston
Phone: +46-31-7864901
Only the fruitful thing is true!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: Mary Haley <haley at ucar.edu>
Date: Friday, 2 June 2017 at 17:16
To: Marston Johnston <shejo284 at gmail.com>
Cc: Beáta Szabó-Takács <szabo.b at czechglobe.cz>, NCL Talk <ncl-talk at ucar.edu>
Subject: Re: [ncl-talk] replace part of colormap
Just an FYI: the example Beáta provided is an excellent one for showing how to create your own color map.
You can also change a color map programmatically, if you don't want to create a new color map file.
See color_19.ncl at:
http://www.ncl.ucar.edu/Applications/color.shtml#ex19
This uses read_colormap_file to read in the desired color map ("amwg") and then sets the first color to white.
Cheers,
--Mary
On Mon, May 15, 2017 at 5:12 AM, Marston Johnston <shejo284 at gmail.com> wrote:
Hi Beata,
It worked perfectly per your instructions. Thanks for the help ☺
Have a great day!
/M
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Marston S. Johnston, PhD
Department of Earth Sciences
University of Gothenburg, Sweden
Email: marston.johnston at gu.se
SkypeID: marston.johnston
Phone: +46-31-7864901
Only the fruitful thing is true!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: Beáta Szabó-Takács <szabo.b at czechglobe.cz>
Date: Monday, 15 May 2017 at 11:05
To: Marston Johnston <shejo284 at gmail.com>, NCL Talk <ncl-talk at ucar.edu>
Subject: RE: replace part of colormap
Hi Marston,
You can produce a new .rgb color palette by copy „amwg256.rgb” and rename it e.g „amwg2”. Open the created amwg2.rgb file and rewrite the first rgb numbers: 146 112 219 to 255 255 255 and save the file. After that, you have to set your environment variable based on http://www.ncl.ucar.edu/Document/Graphics/create_color_table.shtml to use awg2.rgb in your script.
I hope I could help you!
Best regards,
Beata
From: ncl-talk-bounces at ucar.edu [mailto:ncl-talk-bounces at ucar.edu] On Behalf Of Marston Johnston
Sent: Monday, May 15, 2017 10:45 AM
To: NCL Talk <ncl-talk at ucar.edu>
Subject: [ncl-talk] replace part of colormap
Hi,
I am using the color palette "amwg” which sets a light purple color for the lowest value range.
However, I would like to set this part of the spectrum to “white” instead.
I cannot find an example of how this can be done – if it can be done.
Does anyone have any idea? Appreciate your thoughts.
Best,
/M
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Marston S. Johnston, PhD
Department of Earth Sciences
University of Gothenburg, Sweden
Email: marston.johnston at gu.se
SkypeID: marston.johnston
Phone: +46-31-7864901
Only the fruitful thing is true!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170602/e7749155/attachment.html
More information about the ncl-talk
mailing list