[ncl-talk] NCL map line and fill color
Rick Brownrigg
brownrig at ucar.edu
Mon Mar 14 16:12:44 MDT 2016
HI Ryan,
Alan is right about the enhanced color model in later versions of NCL --
I'd also recommend upgrading if you can.
However a couple of comments about your existing script:
i) Are you setting the resources mpFillOn = True? An are you setting
mpFillBoundarySets to something appropriate (e.g., "National")?
ii) Under older versions of Ncl, named colors get mapped to the "closest"
color in the workstation's color map. I notice you reference the colors
you want, and *then* set the colormap to something specific. It's likely
the named colors are getting mapped to the default workstation colormap
(although I can't explain the randomness -- should be consistently the
wrong color!). You might try placing your call to gsn_define_colormap()
before any other references to color.
Hope that helps...
Rick
On Mon, Mar 14, 2016 at 3:57 PM, Alan Brammer <abrammer at albany.edu> wrote:
> You’re ncl version is many years old. This might not be a problem of
> version, but a lot of the colour functionality has improved a fair amount
> since 6.0.
>
> Mainly. in 6.0 colours (or the nearest? equivalent) are pulled from the
> colormap. When you upgrade, colours do not have to be in the colormap and
> thus your named colours will be what you expect.
>
>
>
>
>
> ##############################
> Alan Brammer,
> Post-Doc Researcher
>
> Department of Atmospheric and Environmental Sciences,
> University at Albany, State University of New York, Albany, NY, 12222
> abrammer at albany.edu
> ##############################
>
> On 14 Mar 2016, at 16:47, Ryan Connelly <rconne01 at gmail.com> wrote:
>
> I'm using V6.0.0.
>
> Trying to fill in my map background in a light tan and make my state lines
> a dark brown. Should be easy, but something is bonkers. When I use named
> color variables, the state line color will sometimes plot as something else
> ("Brown" plots as red, "Green" plots as blue, "Grey30" plots as purple,
> etc.). I also cannot get the map fill color to be anything at all, named
> color or number.
>
> Here's the section that contains my map plotting options:
>
> ; Set some basic resources
> res = True
> res at MainTitle = "REAL-TIME WRF"
>
> pltres = True
> mpres = True
>
> mpres at mpGeophysicalLineColor = "orange4" ; inexplicably picks a
> random different color
> mpres at mpNationalLineColor = "Black"
> mpres at mpUSStateLineColor = "Black"
> mpres at mpLimbLineColor = "Black"
> mpres at mpPerimLineColor = "Black"
> mpres at mpMonoFillColor = True
> mpres at mpLandFillColor = 7 ; inexplicably doesn't do
> anything at all
> mpres at mpGeophysicalLineThicknessF = 4.0
> mpres at mpGridLineThicknessF = 2.0
> mpres at mpLimbLineThicknessF = 2.0
> mpres at mpNationalLineThicknessF = 2.0
> mpres at mpUSStateLineThicknessF = 2.0
>
> gsn_define_colormap(wks,"BkBlAqGrYeOrReViWh200")
>
>
> Thanks,
> Ryan
>
> --
> Ryan Connelly
> M.S. Student in Atmospheric Sciences, Stony Brook University
> B.S. in Meteorology with Minors in Mathematics and GIS, Valparaiso
> University
> rconne01 at gmail.com
> ryan.connelly at stonybrook.edu
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> 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/20160314/103a853e/attachment.html
More information about the ncl-talk
mailing list