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 #92404 is a reply to message #92403] Wed, 09 December 2015 05:00 Go to previous messageGo to previous message
greg.addr is currently offline  greg.addr
Messages: 160
Registered: May 2007
Senior Member
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 22:01:30 PDT 2025

Total time taken to generate the page: 1.51989 seconds