[ncl-talk] Color names

Rick Brownrigg brownrig at ucar.edu
Wed Jul 7 10:43:17 MDT 2021


How about something like:

     cmap = read_colormap_file("MPL_PuOr")
     res at cnFillPalette = cmap(::-1,:)

Rick

On Wed, Jul 7, 2021 at 10:21 AM Buzan, Jonathan <jbuzan at purdue.edu> wrote:

> Hi Rick,
>
> To get more detailed, I need to reverse colors on some maps.
>
> Thanks,
> -Jonathan
>
>
>   res at cnFillPalette = "BlueDarkRed18"
> ; need to reverse MPL_PuOr
>   res at cnFillPalette = “MPL_PuOr"
>
>
>
>
> On Jul 7, 2021, at 11:03 AM, Buzan, Jonathan via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
>
> Hi Rick,
>
> Thanks for your help. I was mostly concerned about finding similarly sized
> color tables in the color table and using the cnFillPalette to call the
> tables, so that each plot would have a unique colorbar while still using
> the same plot res.
>
> Cheers,
> -Jonathan
>
>
>
> On Jul 6, 2021, at 5:21 PM, Rick Brownrigg <brownrig at ucar.edu> wrote:
>
> Hi Jonathan,
>
> I don't fully understand what you are trying to do, and why you might need
> named colors. So taking a guess here, there is the read_colormap_file()
> that you can use to read one of the colormaps show in the gallery link, and
> from that you can directly assign the result to cnFillPalette
>
> http://ncl.ucar.edu/Document/Functions/Built-in/read_colormap_file.shtml
>
> HTH...
> Rick
>
>
> On Tue, Jul 6, 2021 at 6:54 AM Buzan, Jonathan via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
>
>> Hi NCL,
>>
>> The predefined colormaps are excellent examples of colors.
>> However, from my experience, the   gsn_define_colormap(wks, colors)
>> limits the flexibility of NCL.
>>
>> Whereas, the  res at cnFillPalette has flexibility.
>>
>> I am attempting to generate a multi paneled plot, and switching the
>> res at cnFillPalette, but I still want to use the color maps.
>>
>> Is there a page that has “named colors” of the color maps?
>> https://www.ncl.ucar.edu/Document/Graphics/named_colors.shtml
>> This page has example colors, but I find it difficult to reproduce these
>> colormaps:
>> https://www.ncl.ucar.edu/Document/Graphics/color_table_gallery.shtml
>>
>>
>> Cheers,
>> -Jonathan
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at mailman.ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210707/14da98f1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: T_Analysis_Plot.png
Type: image/png
Size: 220113 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210707/14da98f1/attachment.png>


More information about the ncl-talk mailing list