[ncl-talk] gsn_Spread_Colors issue

Rashed Mahmood rashidcomsis at gmail.com
Wed Jul 4 12:53:50 MDT 2018


I just realized that gsn_SpreadColors is deprecated in NCL 6.1 and later.

On Tue, Jul 3, 2018 at 7:49 PM, Rashed Mahmood <rashidcomsis at gmail.com>
wrote:

> Hi all,
>
> It seems that there is a possible issue (may be a previously known one)
> when using "gsnSpreadColors" resource. There is difference of one color
> between colorbar of a map plot and manual creation of colorbar with same
> levels and colors.
>
> The attached simple script "colorbar_test.ncl" creates dummy data and runs
> "as is". The top two lines and the following two can be turned on and off
> to create attached fig_1 and fig_2, each containing two colorbars one for
> map (upper one) and one for coloured markers (lower one). For fig_1 the
> colorbars are same (from 0 to onwards) however in fig_2 the central color
> is different. The only difference for plotting these is the number of
> levels (odd or even).
>
> As a test, when I used same script using "cnFillPalette", in attached
> script named "No_problem_script.ncl", the colorbars are exactly same for
> both contour levels. The "no problem" figures are also attached.
>
> I think this is related to how the colours are spanned in two routines
> "gsnSpreadColors" and "cnFillPalette", but still it is surprising to see
> the differences in colorbars of fig_1 and fig_2.
>
>
> Any thoughts on this would be appreciated. I should now be using
> "cnFillPallette", always!
>
> Cheers,
> Rashed
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180704/7b26dfce/attachment.html>


More information about the ncl-talk mailing list