[ncl-talk] highs and lows font colors
Mary Haley
haley at ucar.edu
Mon Apr 16 09:34:12 MDT 2018
Hello,
The wrf_contour routine apparently is setting the high/low label font
colors internally, to whatever color the contour lines are drawn in.
I created a ticket (NCL-2745) to improve/fix this in 6.5.0 (which is
already done because it was an easy fix).
Meanwhile, I
've included the fix
in the attached "wrf_contour_labels_fix.ncl" script.
If you want to try it, simply load this script from your own script, after
any other "load" commands. For example:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
l
oad "./wrf_contour_labels_fix.ncl"
--Mary
On Fri, Apr 13, 2018 at 6:06 PM, Juan Carlos Anduckia <janducki at yahoo.com>
wrote:
> Hello again:
>
> Still a very basic question. I'm trying to plot high and low-pressure
> centers in blue and red, respectively, by using cnHighLabelFontColor, but I
> don't see any effect at all. Am I using this resource in the wrong way?
> .
> This is the pertinent part of the code:
>
> ; Plotting options for SLP shades
> opts = res
> opts at cnFillOn = True
> ; opts at cnFillColors = "BlueWhite"
> ; opts at cnFillPalette = "BlueWhite"
> opts at FieldTitle= " "
> ; opts at ContourParameters = (/900.,1050.,2./)
> opts at gsnSpreadColorEnd = -3
> gsn_define_colormap(wks,"WhiteBlue")
> contour_psl1 = wrf_contour(e1,wks,slp,opts)
> delete(opts)
> ; Plotting options for SLP Contours
> opts = res
> opts at cnLineColor = "Grey25"
> opts at cnHighLabelsOn = True
> opts at cnHighLabelPerimOn = False
> opts at cnHighLabelFontColor = "Blue"
> opts at cnLowLabelsOn = True
> opts at cnLowLabelFontColor = "Red"
> opts at FieldTitle = " "
> ; opts at ContourParameters = (/ 900., 1050., 2. /)
> opts at cnLineLabelBackgroundColor = -1
> opts at gsnContourLineThicknessesScale = 1.0
> contour_psl2 = wrf_contour(e1,wks,slp,opts)
> delete(opts)
>
> ; MAKE PLOTS
> plot = wrf_map_overlays(e1,wks,(/contour_psl1,contour_psl2/),
> pltres,mpres)
>
> Thank you.
>
> _______________________________________________
> 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/20180416/ae870c34/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wrf_contour_labels_fix.ncl
Type: application/octet-stream
Size: 3967 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180416/ae870c34/attachment.obj>
More information about the ncl-talk
mailing list