[ncl-talk] grey continent hiding some data
David Brown
dbrown at ucar.edu
Wed Oct 1 19:29:31 MDT 2014
Hi Kevin,
The problem is not that the continent color is "overwriting" the colors of
your data. It's that the standard "AreaFill" plot requires there to be
several adjacent grid points of non-missing data before it will draw
anything. Isolated points of non-missing data are not drawn at all.
The simplest way to see all your data with the grey colored continents
underneath is to set cnFillMode to "CellFill". This will draw every grid
point. However, it will not be a smooth contour plot; each cell appears as
a little rectangle.
If you want a smooth plot, I would recommend that you do not set the 0
values in your data to -999 and make it into a missing value. Instead,
assuming you want your color bar to stay the same, try setting the 0 values
to a value just below 0 (e.g. -0.1) and then set the first color of the
level colors to transparent. This keeps the gradient close to what it would
be naturally (as opposed to setting it to -999 which is very discontinuous
relative to the rest of the data), but at the same time keeps it less than
0, so it falls below the minimum contour level and is given the color of
the leftmost color in the color bar.
I am attaching a modified version of your script that illustrates my
suggestions.
-dave
On Wed, Oct 1, 2014 at 3:27 PM, kevin.lemorzadec <kevin.lemorzadec at mun.ca>
wrote:
> Dear ncl users,
>
> I am trying to colour the continent off an image with grey. I have done
> that in the past successfully but this time some of my data get overwritten
> by the continent colour and I can't figure out what is happening. Maybe one
> of you will catch something that I haven't as I have been using ncl only
> for a couple of days.
>
> In my script if I comment out :
> Hplot at _FillValue = -999
> All my data are plotted but when I use it to fill the continent in grey
> some day are apparently masked.
>
> I have attached my data file and my script to that email.
> ncl Version 6.1.0
>
> Thanks for any help
>
> --
> Kevin Le Morzadec - Ph.D. candidate
> Dept of Physics and Physical Oceanography,
> Memorial University of Newfoundland, Canada
> Tel 709-864-8654
>
> _______________________________________________
> ncl-talk mailing list
> 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/20141001/5c0cb696/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: HPDpar3Email-mod.ncl
Type: application/octet-stream
Size: 4095 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141001/5c0cb696/attachment.obj
More information about the ncl-talk
mailing list