comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: xyouts: define decimal places of variable
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: xyouts: define decimal places of variable [message #65257 is a reply to message #65255] Wed, 18 February 2009 02:24 Go to previous message
Andy Heaps is currently offline  Andy Heaps
Messages: 22
Registered: March 2006
Junior Member
Hello Julia,
try the following:

xyouts, x, y, STRTRIM(STRING(myvariable, FORMAT='(f10.2)'), 2), /Normal

Cheers
Andy



julia.walterspiel@gmail.com wrote:
> hello everyone
>
> is there a way to define the number of decimal places when plotting a
> (float) variable into a plot via xyouts?
> eg
> xyouts, x, y, myvariable, /Normal
>
> --> 0.3423564 but I only want it to display 0.34
>
> i understand the FORMAT-codes do not work with xyouts...
>
> thanks for any hints,
> julia
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Interpolating/gridding field reflectance spectra
Next Topic: Re: Interpolating/gridding field reflectance spectra

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 06:02:45 PDT 2025

Total time taken to generate the page: 1.27526 seconds