[ncl-talk] Change LabelBar size in the pres-height plot

Mary Haley haley at ucar.edu
Fri Dec 9 14:59:52 MST 2016


Bo,

My apologies. Apparently this was a bug I fixed and it won't be available
until 6.4.0 is released.

It's a very simple fix, so I've attached it here.  It only had a one line
change.

To load this fixed script, the top of your own script needs to look
something like this:

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "./gsn_csm_vector_pres_hgt_fix.ncl"

Nothing else needs to change in your script.

--Mary


On Fri, Dec 9, 2016 at 1:12 PM, Dong, Bo <bdong at albany.edu> wrote:

> Hi Mary,
>
>
> I did the same resources setting as that in your script, but it still
> doesn't work. I did both x11 window and png, but neither one changes the
> colorbar. My code are as following (also attached as a script). It's
> running on NCL6.1.2.  So confused why it doesn't do the job...
>
>
> f  = addfile("pres_height_test_data.nc","r")
> mv = f->mv
> rcdivv = f->rcdivv
> rcwv = f->rcwv
> ;-------------------------------------------------------------
> wks   = gsn_open_wks("x11","labelbartest")
>
> res = True
> res at cnLineLabelsOn          = False
> res at cnInfoLabelOn           = False
> res at cnFillOn             = True
> res at cnFillPalette           = "BlAqGrYeOrRevi200"
> res at vcRefAnnoOrthogonalPosF  = -0.04          ; move reference vec up
> res at vcRefMagnitudeF           = 0.2           ; define vector ref mag
> res at vcRefLengthF              = 0.05          ; define length of vec ref
> res at pmLabelBarWidthF      = 0.8               ; default is shorter
> res at pmLabelBarHeightF     = 0.4               ; default is taller
> res at pmLabelBarOrthogonalPosF = -0.05          ; move color label bar up
>
> plot  = gsn_csm_pres_hgt_vector(wks,mv(0,:,:),rcdivv(0,:,:),rcwv(
> 0,:,:),res)
>
>
> thanks,
> Bo
>
> ------------------------------
> *From:* Mary Haley <haley at ucar.edu>
> *Sent:* Friday, December 9, 2016 11:59:14 AM
> *To:* Dong, Bo
> *Cc:* ncl-talk at ucar.edu
> *Subject:* Re: [ncl-talk] Change LabelBar size in the pres-height plot
>
> Bo,
>
> I suggest not setting these two resources:
>
> res at lbAutoManage         = False
> res at pmLabelBarDisplayMode = "Always"
>
> The other resources you have should be fine, but you are making the values
> rather large. The labelbar is likely to fill up most of your page.
>
> See the attached script and image. I took an existing example from the
> streamlines page, and made the labelbar extra thick using the
> pm*Width/Height resources.
>
> --Mary
>
>
> On Thu, Dec 8, 2016 at 5:18 PM, Dong, Bo <bdong at albany.edu> wrote:
>
>> Dear NCL users,
>>
>>
>> I was trying to adjust the width and height of the labelbar associated
>> with a gsn_csm_pres_hgt_vector plot. The resources I set include:
>>
>> res at lbAutoManage         = False
>> res at pmLabelBarDisplayMode = "Always"
>> res at pmLabelBarWidthF      = 0.6
>> res at pmLabelBarHeightF     = 0.7
>>
>> However, it doesn't change anything to the labelbar. For
>> gsn_csm_contour_map it works, but not for the gsn_csm_pres_hgt_vector
>> plot
>>
>> Does anyone know how to set the resources to make it work?
>>
>>
>> Many thanks,
>>
>> Bo
>>
>> _______________________________________________
>> 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/20161209/14751906/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gsn_csm_vector_pres_hgt_fix.ncl
Type: application/octet-stream
Size: 4454 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161209/14751906/attachment.obj 


More information about the ncl-talk mailing list