<div dir="ltr"><div>Oh, BTW:  read_colormap_file()  will always return an array of Nx4, ie., RGB-alpha tuples.  If you have previously set cnFillPalette with a named color map that consisted of only RGB tuples, then you might get an mis-match error if you try and reassign cnFillPalette as I suggested. In that case, be sure to use the reassignment operator :=</div><div><br></div><div> res@cnFillPalette  := cmap(::-1,:)</div><div><br></div><div>RB<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 7, 2021 at 10:43 AM Rick Brownrigg <<a href="mailto:brownrig@ucar.edu">brownrig@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>How about something like:</div><div><br></div><div>     cmap = read_colormap_file("MPL_PuOr")</div><div>     res@cnFillPalette  = cmap(::-1,:)</div><div><br></div><div>Rick<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 7, 2021 at 10:21 AM Buzan, Jonathan <<a href="mailto:jbuzan@purdue.edu" target="_blank">jbuzan@purdue.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div>
<span style="color:rgb(0,0,0)">Hi Rick,</span>
<div style="color:rgb(0,0,0)"><br>
</div>
<div style="color:rgb(0,0,0)">To get more detailed, I need to reverse colors on some maps.</div>
<div style="color:rgb(0,0,0)"><br>
</div>
<div style="color:rgb(0,0,0)">Thanks,</div>
<div style="color:rgb(0,0,0)">-Jonathan</div>
<div style="color:rgb(0,0,0)"><br>
</div>
<div style="color:rgb(0,0,0)"><br>
</div>
<div style="color:rgb(0,0,0)">
<div>  res@cnFillPalette = "BlueDarkRed18"</div>
<div>; need to reverse MPL_PuOr</div>
<div>  res@cnFillPalette = “MPL_PuOr"</div>
<div><br>
</div>
<div><img id="gmail-m_-61151316621472579gmail-m_-5759938730456814768FB37A9BF-F98B-4283-89DE-9314EF16270E" src="cid:17a81d721c0bbdbe6741"></div>
<div><br>
</div>
<div><br>
</div>
</div>
<div><br>
<blockquote type="cite">
<div>On Jul 7, 2021, at 11:03 AM, Buzan, Jonathan via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:</div>
<br>
<div>
<div>
Hi Rick,
<div><br>
</div>
<div>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. </div>
<div><br>
</div>
<div>Cheers,</div>
<div>-Jonathan</div>
<div><br>
</div>
<div><br>
<div><br>
<blockquote type="cite">
<div>On Jul 6, 2021, at 5:21 PM, Rick Brownrigg <<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>> wrote:</div>
<br>
<div>
<div dir="ltr">
<div>Hi Jonathan,</div>
<div><br>
</div>
<div>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</div>
<div><br>
</div>
<div><a href="http://ncl.ucar.edu/Document/Functions/Built-in/read_colormap_file.shtml" target="_blank">http://ncl.ucar.edu/Document/Functions/Built-in/read_colormap_file.shtml</a></div>
<div><br>
</div>
<div>HTH...</div>
<div>Rick</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Jul 6, 2021 at 6:54 AM Buzan, Jonathan via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi NCL,<br>
<br>
The predefined colormaps are excellent examples of colors. <br>
However, from my experience, the   gsn_define_colormap(wks, colors)  limits the flexibility of NCL.<br>
<br>
Whereas, the  res@cnFillPalette has flexibility. <br>
<br>
I am attempting to generate a multi paneled plot, and switching the  res@cnFillPalette, but I still want to use the color maps.<br>
<br>
Is there a page that has “named colors” of the color maps? <br>
<a href="https://www.ncl.ucar.edu/Document/Graphics/named_colors.shtml" rel="noreferrer" target="_blank">https://www.ncl.ucar.edu/Document/Graphics/named_colors.shtml</a><br>
This page has example colors, but I find it difficult to reproduce these colormaps:<br>
<a href="https://www.ncl.ucar.edu/Document/Graphics/color_table_gallery.shtml" rel="noreferrer" target="_blank">https://www.ncl.ucar.edu/Document/Graphics/color_table_gallery.shtml</a><br>
<br>
<br>
Cheers,<br>
-Jonathan<br>
<br>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></div>
</blockquote>
</div>
<br>
</div>

</blockquote></div>
</blockquote></div>