Re: xy plot with letters

From: Michael Notaro <mnotaro_at_nyahnyahspammersnyahnyah>
Date: Fri, 12 May 2006 12:41:13 -0500

Thanks Dennis. It works now.
Mike

On May 12, 2006, at 12:32 PM, Dennis Shea wrote:

> Mike
>
> Not sure ehy there are no examples of this BUT u must
> use gsn_add_text when doing panels:
>
> txres = True
> txres@txFontHeightF = 0.01
> ...
> dum0 = gsn_add_text(wks,plot(0),"string0",x,y,txres)
> dum1 = gsn_add_text(wks,plot(1),"string1",x,y,txres)
> dum2 = gsn_add_text(wks,plot(2),"string2",x,y,txres)
>
> ...
> gsn_panel(wks,plot,(/3,1/),pnlres)
>
> Documentation and an example can be found at:
>
> http://ngwww.ucar.edu/ngdoc/ng/ug/ncl/gsun/
> appendixa.html#gsn_add_text
>
> D
>> Delivered-To: shea_at_ucar.edu
>> X-Original-To: ncl-talk_at_mailman.ucar.edu
>> Delivered-To: ncl-talk_at_mailman.ucar.edu
>> Delivered-To: ncl-talk_at_ucar.edu
>> Date: Fri, 12 May 2006 12:16:02 -0500
>> From: Michael Notaro <mnotaro_at_wisc.edu>
>> Subject: Re: xy plot with letters
>> To: Adam Phillips <asphilli_at_cgd.ucar.edu>, ncl-talk_at_ucar.edu
>> MIME-version: 1.0
>> Content-transfer-encoding: 7BIT
>> X-Spam-PmxInfo: Server=avs-1, Version=5.1.2.240295, Antispam-
>> Engine: 2.3.0.1,
> Antispam-Data: 2006.5.12.95112, SenderIP=144.92.130.73
>> X-Virus-Scanned: amavisd-new at ucar.edu
>> Cc:
>> X-BeenThere: ncl-talk_at_ucar.edu
>> X-Mailman-Version: 2.1.5
>> List-Id: NCAR Command Language User Group <ncl-talk.ucar.edu>
>> List-Unsubscribe: <http://mailman.ucar.edu/mailman/listinfo/ncl-
>> talk>,
> <mailto:ncl-talk-request_at_ucar.edu?subject=unsubscribe>
>> List-Post: <mailto:ncl-talk_at_ucar.edu>
>> List-Help: <mailto:ncl-talk-request_at_ucar.edu?subject=help>
>> List-Subscribe: <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>,
> <mailto:ncl-talk-request_at_ucar.edu?subject=subscribe>
>> X-Virus-Scanned: amavisd-new at ucar.edu
>>
>> Adam,
>> Thanks for your help. It works but does not put the letters over the
>> plot correctly.
>> I have a 2 panel plot using gsn_panel. The letters should fit over
>> the line plot
>> in the lower panel but instead the letters appear within the center
>> of the screen.
>> How can I get the letters to fit within the lower panel plot?
>> Thanks,
>> Mike
>>
>> On May 11, 2006, at 5:25 PM, Adam Phillips wrote:
>>
>>> Hi Mike,
>>>
>>> Yes you can. All you have to do is use gsn_text:
>>> http://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_text.shtml
>>>
>>> Here is an example
>>>
>>> res = True
>>> ......
>>> res@gsnDraw = False
>>> res@gsnFrame = False
>>> plot = gsn_csm_xy(wks,xdata,ydata,res)
>>>
>>> tres = True
>>> tres@txFontHeightF = 0.02
>>> mlist = (/"J","F","M","A","M","J"/)
>>> do gg = 0,dimsizes(xdata)-1
>>> gsn_text(wks,plot,mlist(gg),xdata(gg),ydata(gg),tres)
>>> end do
>>> draw(wks)
>>> frame(wks)
>>>
>>> Adam
>>>
>>> Michael Notaro wrote:
>>>> I have an XY plot in which the X axis is months (Jan Year 1, Feb
>>>> Year 1, ..., Dec Yr 1, Jan Yr 2...).
>>>> I know how to add marks to the line. However, I would like
>>>> instead to add letters to the line plot,
>>>> with "J" for the first time, "F", for the second, etc..., so that
>>>> it is apparent which month each point
>>>> pertains to. Can I do this?
>>>> Thanks,
>>>> Mike
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> ncl-talk_at_ucar.edu
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>> --
>>> --------------------------------------------------------------
>>> Adam Phillips asphilli_at_ucar.edu
>>> National Center for Atmospheric Research tel: (303) 497-1726
>>> ESSL/CGD/CAS fax: (303) 497-1333
>>> P.O. Box 3000
>>> Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk_at_ucar.edu
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk_at_ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri May 12 2006 - 11:41:13 MDT

This archive was generated by hypermail 2.2.0 : Wed May 17 2006 - 09:57:59 MDT