[ncl-talk] resources issue
Rashed Mahmood
rashidcomsis at gmail.com
Tue Jul 13 13:33:28 MDT 2021
Hi Ali,
You are defining the "cmap_data" after calling "contour_lh =
gsn_csm_contour(wks,lh_avg,res) " so this would not work. You can move
contour_lh* after your final res settings. Normally I prefer using
something like:
res at cnFillPalette = cmap_data(0:dimsizes(levels)-1,:)
contour_lh = gsn_csm_contour(wks,lh_avg,res)
There are some resources which are likely not needed for example
(res at cnFillColors, res at lbLabelStrings).
I am not sure why triangle edges do not work but this can be easily
tested by only plotting contour_lh (i.e. without calling overlays).
Cheers,
Rashed
On Tue, Jul 13, 2021 at 4:42 PM ali mughal via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:
> Dear NCL users
>
> I am trying to using the following plotting sequence but some of the
> resources do not change no matter how hard I try. I mention the issues I am
> facing adjacent to the lines in the script. Secondly, I am also trying to
> obtain triangular edges in the label bar but I am not successful in that as
> well. I hope some one can help. Please see the plotting sequence below
>
> lh_avg at description = "ABC"
> lh_avg at units = "~S~o~N~C"
> type = "png"
> wks = gsn_open_wks(type,"LH_d05_diff_3_1_"+hour)
>
> res = True
> res at gsnMaximize = True
> res at gsnDraw = False
> res at gsnFrame = False
> res at cnFillOn = True
> res at cnLinesOn = False
> res at tmYROn = False
> res at lbOrientation = "Vertical"
> res at lbLabelFontHeightF = 0.010
> res at lbLabelFontThicknessF =1.5
> res at lbBoxMajorExtentF = 0.75
> res at lbBoxEndCapStyle = "TriangleBothEnds" (why is
> this not working ? Do I need to add other resources or turn off automatic
> settings)
> contour_lh = gsn_csm_contour(wks,lh_avg,res)
> getvalues contour_lh
> "cnLevels" : levels
> end getvalues
> cmap_data=read_colormap_file("wgne15") (Whatever I set here is
> not shown in the final plot. I tried setting this to "BlWhRe" but it didn't
> worked nor does "ncl_default" work. I only see a default image
> res at cnFillColors = cmap_data(0:dimsizes(levels)-1,:)
> res at lbLabelStrings = sprintf("%3.1f",levels)
>
> pltres = True
> pltres at NoTitles = True
> pltres at gsnMaximize = True
> pltres at FramePlot = False
> pltres at PanelPlot = True
> mpres = True
> mpres at mpOutlineBoundarySets ="NoBoundaries"
> plot = wrf_map_overlays(a,wks,(/contour_lh/),pltres,mpres)
> shape_files =
> (/"/Shapefiles/SGP_adm_shp/SGP_adm0.shp","/Shapefiles/MYS_adm0.shp","/Shapefiles/IDN_adm0.shp"/)
> plot = add_coastline_sgmyid(shape_files,wks,plot,"black")
> draw(plot)
> frame(wks)
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210713/3af583e5/attachment.html>
More information about the ncl-talk
mailing list