[ncl-talk] Fwd: help

Dennis Shea shea at ucar.edu
Wed Jun 8 07:29:39 MDT 2016


In my opinion, there is a bug in gsn_csm_vector. I will open a ticket.

Try the following.

;
; Generate dummy vector data arrays
;
  M  = 30
  N  = 30
  PI = 3.14159

  V = 10.0 * cos(onedtond((2.0 * PI / M) * ispan(0,M-1,1),(/N,M/)))
  U = 10.0 * cos(onedtond((2.0 * PI / N) * ispan(0,N-1,1),(/M,N/)))
  W = sqrt(U^2 +V^2)

  wks   = gsn_open_wks ("x11", "vec_test")
  res                     = True

  res at tiMainString         = "Title"
  vector = gsn_csm_vector_scalar(wks,U,V,W,res)

  res at lbOrientation =   "vertical"          ; vertical label bar
  vector = gsn_csm_vector_scalar(wks,U,V,W,res)

  delete(res at lbOrientation)  ; return to horizontal

  res at vcRefAnnoOrthogonalPosF = -1.0             ; move ref vector up
  vector = gsn_csm_vector_scalar(wks,U,V,W,res)

  res at vcRefAnnoOrthogonalPosF = -0.125           ; move ref vector up
  vector = gsn_csm_vector_scalar(wks,U,V,W,res)



On Wed, Jun 8, 2016 at 6:54 AM, Kacie Shourd <Kacie.Shourd at dri.edu> wrote:

> You could also try to move the label bar up closer to the plot. Try poking
> around here: http://www.ncl.ucar.edu/Applications/labelbar.shtml
> Specifically *pmLabelBarOrthogonalPosF*
> <http://www.ncl.ucar.edu/Document/Graphics/Resources/pm.shtml#pmLabelBarOrthogonalPosF>
> or *pmLabelBarParallelPosF
> <http://www.ncl.ucar.edu/Document/Graphics/Resources/pm.shtml#pmLabelBarOrthogonalPosF>.*
>
> best
> Kacie
> ------------------------------
> *From:* ncl-talk-bounces at ucar.edu [ncl-talk-bounces at ucar.edu] on behalf
> of Key Tone [keytone25 at gmail.com]
> *Sent:* Tuesday, June 07, 2016 10:49 PM
> *To:* ncl-talk at ucar.edu
> *Subject:* [ncl-talk] Fwd: help
>
>
> ---------- Forwarded message ----------
> From: Key Tone <keytone25 at gmail.com>
> Date: Wed, Jun 8, 2016 at 1:33 AM
> Subject: Re: [ncl-talk] help
> To: Kacie Shourd <Kacie.Shourd at dri.edu>
>
>
> Hmm, even when I adjusted, it appears the legend still is cut off. Do you
> think this may be something more than just a resizing issue?
>
> Thanks
>
> On Wed, Jun 8, 2016 at 1:22 AM, Kacie Shourd <Kacie.Shourd at dri.edu> wrote:
>
>> Hi!
>>
>> It should work if you make the wks bigger.
>>
>> try adding this bit of code:
>>
>>   wks_type = "x11"
>>   wks_type at wkWidth = 2500
>>   wks_type at wkHeight = 2500
>>   wks = gsn_open_wks(wks_type, "cyclone_wind")
>>
>> And adjust the numbers for width and height as necessary until the legend
>> is no longer cut off.
>>
>> Best,
>> Kacie
>>
>> ------------------------------
>> *From:* ncl-talk-bounces at ucar.edu [ncl-talk-bounces at ucar.edu] on behalf
>> of Key Tone [keytone25 at gmail.com]
>> *Sent:* Tuesday, June 07, 2016 10:12 PM
>> *To:* ncl-talk at ucar.edu
>> *Subject:* [ncl-talk] help
>>
>> Hello,
>>
>> For the vector plot, below, what should I include in my code to get the
>> legend to show? It looks cut off:
>> [image: Inline image 1]
>>
>> Here is the code I used to get this plot:
>> [image: Inline image 2]
>>
>>
>>
>> PUBLIC RECORDS NOTICE: In accordance with NRS Chapter 239, this email and
>> responses, unless otherwise made confidential by law, may be subject to the
>> Nevada Public Records laws and may be disclosed to the public upon request.
>>
>
>
>
> _______________________________________________
> 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/20160608/4bdbdb39/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 12508 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160608/4bdbdb39/attachment.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 58244 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160608/4bdbdb39/attachment-0001.png 


More information about the ncl-talk mailing list