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

Home » Public Forums » archive » Re: Translate characters/string size to data/normal coordinates?
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: Translate characters/string size to data/normal coordinates? [message #40255 is a reply to message #40253] Sun, 01 August 2004 09:33 Go to previous messageGo to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
J.K. wrote:
> Is there any way to know the position of characters written to a
> device with xyouts? I'd like to do an xyouts but clear anything
> drawn underneath the text first with a polyfill.
>
> I can do it by trial and error but I could generalize it if I could
> translate characters to width and height in data or normal coordinates.
> I suppose this would change with !p.charsize/charsize/font selection.
>
> Any ideas?
>
> Thanks,
> John K.


You could use the widths keyword of xyouts. First write the word outside
of the plot.

You could also have a look in our xyouts_box routine
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/xyouts_box_dbase.pro.html

This routine did already the job you described.


tek_color
PLOT, findgen(10)
x=RANDOMU(1, 1000)*10 & y=randomu(2, 1000)*10
OPLOT, x,y, psym=1
OPLOT, findgen(10)-0.5 & oplot, findgen(10)-0.6
xyouts_box, 1, 1, 'test 11', /DATA $
, textcolor=2, boxcolor= 3 $
, charsize=3



Please have a look for further routines into

http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html



cheers

Reimar
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Object Graphics: Combine 2d with 3d
Next Topic: Re: Combobox / Droplist index problem

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

Current Time: Sun Oct 12 04:24:58 PDT 2025

Total time taken to generate the page: 1.32501 seconds