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

Home » Public Forums » archive » Re: Q: Length (on screen) of text
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Q: Length (on screen) of text [message #6736] Fri, 02 August 1996 00:00
steinhh is currently offline  steinhh
Messages: 260
Registered: June 1994
Senior Member
In article <4tt652$fr1@kwuz.nerc-keyworth.ac.uk>, wmc@unixa.nerc-keyworth.ac.uk (William Connolley) writes:
|> I want to annotate a map with lots of text representing various stations. I
|> don't want these to overlap. So I have to know how big they are going to be...
|> so I can jiggle them a bit if they are going to overlap. But there doesn't seem
|> to be any IDL routine to "measure" a string thats going to be plotted.
|>
|> Any ideas?

Look at the documentation for the WIDTH keyword in XYOUTS.

To make sure e.g., that a text is shorter than the width of
a window, something like this should do:

DEVICE,GET_GRAPHICS_FUNCTION=OLDGRAPH
DEVICE,SET_GRAPHICS_FUNCTION=5 ; GXnoop --
xyouts,0.,0.,text,width=text_width,/normal
device,set_graphics_function=OLDGRAPH
xyouts,0.,0.,text,charsize=1./width ;; Adjust charsize to fit.

Stein Vidar
Re: Q: Length (on screen) of text [message #6737 is a reply to message #6736] Fri, 02 August 1996 00:00 Go to previous message
Andy Loughe is currently offline  Andy Loughe
Messages: 174
Registered: November 1995
Senior Member
William Connolley wrote:
>
> I want to annotate a map with lots of text representing various stations. I
> don't want these to overlap. So I have to know how big they are going to be...
> so I can jiggle them a bit if they are going to overlap. But there doesn't seem
> to be any IDL routine to "measure" a string thats going to be plotted.
>
> Any ideas?
>
> ---
> William M Connolley | wmc@bas.ac.uk | http://www.nbs.ac.uk/public/icd/wmc/
> Climate Modeller, British Antarctic Survey | Disclaimer: I speak for myself


If you are happy using normalized coordinates, then the WIDTH
keyword to the xyouts procedure should give you the information
you seek. Check it out!

If you are happier using data coordinates, you may need to
use convert_coord as well.

--
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 "He who laughs last thinks slowest!"
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: black and white xterminals and idl
Next Topic: Q: Length (on screen) of text

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

Current Time: Fri Oct 10 10:18:23 PDT 2025

Total time taken to generate the page: 0.95818 seconds