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

Home » Public Forums » archive » Text print in figure with format
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: Text print in figure with format [message #92405 is a reply to message #92404] Wed, 09 December 2015 07:49 Go to previous message
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
Thanks Greg,
That was the point :)
Cheers,
Dave

On Wednesday, December 9, 2015 at 2:00:43 PM UTC+1, greg...@googlemail.com wrote:
> On Wednesday, December 9, 2015 at 1:44:00 PM UTC+1, dave poreh wrote:
>> Folks
>> Hi,
>> I need to have a format like this:
>> .....
>> str='$\rho=$'+string(corr)
>> subtitle = text(0.24, 0.8, str, /bold,FORMAT='(F5.2)' ,font_size=12)
>>
>> but it is not working in IDL. it shows like 0.64232, but i need two decimal digits.
>> Will u pls help?
>> Best,
>> Dave
>
> It's because you're making your string before you apply the format code. Do it in the string() call:
>
> IDL> a=0.64232
> IDL> str=string(a,format="(f5.2)")
> IDL> str
> 0.64
>
> cheers,
> Greg
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: IDLWAVE tab completion of executive commands
Next Topic: Optimizing loops

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

Current Time: Fri Oct 10 01:50:26 PDT 2025

Total time taken to generate the page: 0.80067 seconds