[gradsusr] Display only 1 decimal of a real number

Thomas Robinson ter at hawaii.edu
Wed Apr 15 20:14:14 EDT 2015


Aloha GrADS Users,

I am displaying my maximum values on a plot where they occur.  The values
are all real numbers, so they are like 6.92051, 12.048, etc.  They seem to
be 7 characters long at the most. My script code looks like this:

'set string 1 t1 8.5'
'draw string 'xx' 'yy' 'val

where xx and yy are the coordinates where I want to plot and val is the
value that I'm plotting.

What I want to do is have grads plot 6.9 or 12.0 instead of 6.92051 or
12.048.  Is there a way to specify how many characters of a string I
display, or restrict my values to display only one digit after the decimal
point?  I would settle for 6.92 if I had to display 4 characters.

Thanks for the help,
Tom


-- 
Tom Robinson
Treasurer - Graduate Student Organization
Secretary - Student Athletic Fee Committee
Graduate Student - Department of Atmospheric Science
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20150415/c0f4263d/attachment.html 


More information about the gradsusr mailing list