[gradsusr] Help: How to customize contour label in GrADS?

Jennifer Adams jma at cola.iges.org
Tue Jan 21 11:26:15 EST 2014


You have to draw each contour (one at a time) inside your while loop.  
So, along with 'set clab' you will also need 'set clevs' and  
'display'. I would also add 'set clab masked' to get rid of the white  
rectangles behind the contour labels.
--Jennifer


On Jan 21, 2014, at 4:40 AM, 얍준후이 wrote:

> Hi Jennifer,
>
>
> I  query the shade info and read the contour level and try to 'set  
> clab 'calender
>
>
> *calender is a variable which gives the julian date
>
>
> As the result is obvious, it will only print the last string at the  
> end of the loop.
>
>
> Am I doing it wrong?
>
>
> Regards
>
> JH
>
>
>
> -----Original Message-----
> From: "Jennifer Adams"<jma at cola.iges.org>
> To: "GrADS Users Forum"<gradsusr at gradsusr.org>;
> Cc:
> Sent: 2014-01-17 (금) 03:25:07
> Subject: Re: [gradsusr] Help: How to customize contour label in GrADS?
>
> You can use 'set clab FOO' and it will draw a label as "FOO". I  
> guess you could draw each contour individually, looping over the  
> contour level, convert the level from julian day to a string, then  
> label that contour appropriately.
>
> --Jennifer
>
>
> On Jan 16, 2014, at 1:18 PM, Ricardo Hallak wrote:
>
>> Hi Jennifer,
>>
>> I think JH Yap wants to get a contour label with something like,  
>> for example, "21JAN" instead the julian day 21, and so on. His  
>> contour levels are julian days. I guess it is kind of difficult to  
>> do, if not impossible. That is, to get julian days as contour  
>> levels in a map, certainly it comes from a matrix of data composed  
>> by julian days, one julian day (a number) for each grid point. How  
>> to get the same information using a "string" date? The problem here  
>> is that contours, in GrADS, comes from numbers, through a process  
>> of interpolation (numbers again), not from strings. How to  
>> interpolate "strings"?
>>
>> Maybe JH Yap could give us an example of contour label he wants,  
>> just to clarify a bit more.
>>
>> Ricardo
>>
>> De: "Jennifer Adams" <jma at cola.iges.org>
>> Para: "GrADS Users Forum" <gradsusr at gradsusr.org>
>> Enviadas: Quinta-feira, 16 de Janeiro de 2014 12:48:26
>> Assunto: Re: [gradsusr] Help: How to customize contour label in  
>> GrADS?
>>
>> Are you interesting in changing the contour labels or the axis  
>> labels? For contour labels, 'set clab' is the most general, and  
>> 'set clopts' and 'set clskip' control their appearance. For axis  
>> labels, most of the controls do not apply to a date/time axis, so  
>> you have to override manually with 'set xlabs'. --Jennifer
>>
>> On Jan 15, 2014, at 3:36 AM, 얍준후이 wrote:
>>
>> Hi GrADS team,
>>
>> I have displayed my contour by default like this
>>
>> ga-> set gxout contour
>> ga -> d flowers
>> Contouring: 80 to 145 interval 5
>>
>> Then I get my contour presented in map as per the image attached.
>>
>> The contour label is julian date.
>>
>>
>>
>> Now I would like to change the contour label to regular date.
>>
>> I already made a function for julian date to regular date  
>> conversion in GrADS script language.
>>
>> How could I customize the default contour label (julian date) to  
>> regular date by using my function?
>>
>> Thank you
>>
>> -------------------------
>> JH Yap, M.Eng.
>>
>> Software Development Engineer / Safe Korea
>>
>> Office: +82-02-2668-3926
>> Mobile: +82-10-8281-3241
>> E-mail: jhyap at safekorea.co.kr
>>
>>
>> <how to change contour  
>> label.JPG>_______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>> --
>> Jennifer M. Adams
>> Center for Ocean-Land-Atmosphere Studies (COLA)
>> 111 Research Hall, Mail Stop 2B3
>> George Mason University
>> 4400 University Drive
>> Fairfax, VA 22030
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>
> --
> Jennifer M. Adams
> Center for Ocean-Land-Atmosphere Studies (COLA)
> 111 Research Hall, Mail Stop 2B3
> George Mason University
> 4400 University Drive
> Fairfax, VA 22030
>
>
>
>
>
> <set contour label.JPG><only print the last  
> label.JPG>_______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

--
Jennifer M. Adams
IGES/COLA
4041 Powder Mill Road, Suite 302
Calverton, MD 20705
jma at cola.iges.org



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20140121/0234633b/attachment.html 


More information about the gradsusr mailing list