[ncl-talk] resources issue
Rashed Mahmood
rashidcomsis at gmail.com
Thu Jul 15 00:15:01 MDT 2021
What is your NCL version? (ncl -V)
Note that "lbBoxEndCapStyle" resource is available in version 6.4.0 and
later ones. You may need to upgrade to the latest version.
On Thu, Jul 15, 2021 at 5:51 AM ali mughal <mughalali655 at gmail.com> wrote:
> Thanks for sharing the script.
>
> I made changes to my script using your shared script (please see attached)
> but I still get the following warning and the attached image does not show
> triangular edges.
>
> warning:lbBoxEndCapStyle is not a valid resource in testplot_contour at
> this time
> warning:lbBoxEndCapStyle is not a resource in the given object
>
>
>
> On Wed, Jul 14, 2021 at 5:21 PM Rashed Mahmood <rashidcomsis at gmail.com>
> wrote:
>
>> I am not sure what you are trying to achieve here. Did you try to test
>> this? What does your plot look like?
>> Since I do not have your data file so I used dummy data to test the plot
>> using your resources. See attached plot and the script, there is no problem
>> with triangle edges.
>>
>> On Wed, Jul 14, 2021 at 7:55 AM ali mughal <mughalali655 at gmail.com>
>> wrote:
>>
>>> Dear Rashed
>>>
>>> Thank you for the suggestion. It worked.
>>>
>>> Can anyone let me know how to correct obtain triangular edges for the
>>> label bar considering the sequence below and suggestion from Rashed.
>>>
>>> On Wednesday, July 14, 2021, Rashed Mahmood <rashidcomsis at gmail.com>
>>> wrote:
>>>
>>>> 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/20210715/b5b2a7e0/attachment.html>
More information about the ncl-talk
mailing list