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

Home » Public Forums » archive » Re: variables in plot titles
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: variables in plot titles [message #7800 is a reply to message #7798] Mon, 13 January 1997 00:00 Go to previous messageGo to previous message
Andy Loughe is currently offline  Andy Loughe
Messages: 174
Registered: November 1995
Senior Member
David Fanning wrote:
>
> Bobby Allen <ballen1@gl.umbc.edu> writes:
>
>> I wanted to know if it is possible to have the value of a variable in
>> the title of a plot? For instance, say I want the value of x in the
>> title, because it might change with each complilation for some reason.
>> How would I do that, if it's possible.
>
> Try this:
>
> x = 5
> thisTitle = 'Number ' + STRTRIM(x,2)
> PLOT, FINDGEN(10), Title=thisTitle


Or more generally...

thisTitle = 'Number ' + strcompress( string(x) )

--
Andrew F. Loughe | afl@cdc.noaa.gov
University of Colorado, CIRES | http://cdc.noaa.gov/~afl
Campus Box 449 | phn:(303)492-0707 fax:(303)497-7013
Boulder, CO 80309-0449 | "If you are going to be blue, be bright
blue!"
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: reading and processing netCDF Datafiles
Next Topic: MINOR CORRECTION

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

Current Time: Sun Oct 12 09:38:35 PDT 2025

Total time taken to generate the page: 1.44094 seconds