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

Home » Public Forums » archive » Color Fonts?!?!?
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: Color Fonts?!?!? [message #30349 is a reply to message #30304] Thu, 18 April 2002 12:51 Go to previous messageGo to previous message
Ken Mankoff is currently offline  Ken Mankoff
Messages: 158
Registered: February 2000
Senior Member
On Thu, 18 Apr 2002, Sean Davis wrote:
> So my question is, how would I know the correct positions to send to
> XYOUTS so that the xtitle appears in the same place as it would as if I
> had just called
>
> PLOT, findgen(20), xtitle='this is a cool title'

In english if you prefer that to code:

1) plot your data
2) get the length of your *full* title in NORMAL coords like this:
XYOUTS, 10, 10, title, /norm, width=width
3) get the x-axis range via the !x.crange word
4) translate (2) or (3) to either NORM or DATA coordinates
5) calculate the beginning of the position of the title
This is 1/2 of your axis range - 1/2 of the length of the title
6) split your title into 3 (or more parts)
7) for each part in (6) do (8)
8) XYOUTS a part of your title, and get the width it took. Translate
this width to whatever coord system you chose in (4).


Feel free to do the above with any charsize and charwidth you want.
Current limitations would be if you use logarithmic axis, and maybe if
your axis is negative, and probably if your axis increases to the
*left*, etc...

-k.
--
------------------------------------------------------------ ---------------
Ken Mankoff http://lasp.colorado.edu/snoe/
http://lasp.colorado.edu/mars/
http://lasp.colorado.edu/~mankoff/ http://lasp.colorado.edu/marsrobot/
------------------------------------------------------------ ---------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Is there a fast Complex ATAN in IDL 5.5?
Next Topic: From a novice in IDL

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

Current Time: Wed Oct 08 16:22:40 PDT 2025

Total time taken to generate the page: 0.10533 seconds