[ncl-talk] Attach text

Adam Phillips asphilli at ucar.edu
Thu Oct 22 11:32:23 MDT 2015


Hi Amadou,
Change the following coding:
 do n = 0, 330, 45
x1 = mnmxintw(2)*nCircles*sin(rad*n)
y1 = mnmxintw(2)*nCircles*cos(rad*n)

labelCirc = ""+(n)
       plot@$unique_string("dum")$ = \
                 gsn_add_text(wks,plot,labelCirc \
                          ,x1 \
                          ,y1,txRes)

   end do

to this:

  ; untested
         label_angle = ispan(0,315,45)
         label_string = (/"N","NE","E","SE","S","SW","W","NW"/)
 do n = 0, dimsizes(label_angle)-1
x1 = mnmxintw(2)*nCircles*sin(rad*label_angle(n))
y1 = mnmxintw(2)*nCircles*cos(rad*label_angle(n))

labelCirc = label_string(n)
        plot@$unique_string("dum")$ = \
                  gsn_add_text(wks,plot,labelCirc \
                           ,x1 \
                           ,y1,txRes)

    end do

Hope that helps. If not, or if you have further questions please respond to
the ncl-talk email list.
Adam


On Thu, Oct 22, 2015 at 8:22 AM, Amadou Coulibaly <mpapin24 at gmail.com>
wrote:

> Dear NCL users,
>
> I have plotted the diurnal hodograghs of some stations, but on my plots I
> wanted to represent ["N", "NE", "E", "SE", "S", "SW", "W", "NW"] instead of
> their values like appearing on my plots ["0", "45", "90", "135", "180",
> "225", "270", "315"].
>
> Is there someone who can help me? Please find attached my script et plot.
>
> Best regards
>
> --
> * COULIBALY   AMADOU   *
> PhD  Student  on  West  African  Climate  System (WACS)
> FUTA - Federal  University  of  Technology of Akure, Nigeria
>
> *Visiting Student - *
> *University of Cologne, Germany**Institute of Geophysics and Meteorology*
> Pohligstr. 3 / Office 3.102
> D-50969 Köln
>
> *Project*: WASCAL (West African Science Service Centre on Climate Change
> and Adapted Land Use)
> Phone:(+234) 810 795 2836 /(+223) 65 67 27 57 /(+226) 64 57 37 27 /+49
> 15218352574
>
> E-mail: mpapin24 at gmail.com / coulibalya68 at yahoo.com
>
> "*The time is always right to do right": Nelson Mandela*
>
> *"Character is like a tree and reputation like a shadow.  The shadow is
> what we think of it; the tree is the real thing" : Abraham Lincoln*
>
> *"Do what you can, with what you have, where you are" Theodore Roosevelt*
>
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>


-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151022/6c0f7469/attachment.html 


More information about the ncl-talk mailing list