[ncl-talk] gsn_Spread_Colors issue
Rashed Mahmood
rashidcomsis at gmail.com
Tue Jul 3 20:49:35 MDT 2018
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/20180703/2e952dbf/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: colorbar_test.ncl
Type: application/octet-stream
Size: 4017 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180703/2e952dbf/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fig_1.pdf
Type: application/pdf
Size: 186116 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180703/2e952dbf/attachment-0004.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fig_2.pdf
Type: application/pdf
Size: 182325 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180703/2e952dbf/attachment-0005.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: No_problem_script.ncl
Type: application/octet-stream
Size: 4034 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180703/2e952dbf/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: No_prob_fig_1.pdf
Type: application/pdf
Size: 186058 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180703/2e952dbf/attachment-0006.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: No_prob_fig_2.pdf
Type: application/pdf
Size: 182332 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180703/2e952dbf/attachment-0007.pdf>
More information about the ncl-talk
mailing list