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

Home » Public Forums » archive » Re: Plotting a Text Box below a plot so that also works when !P.MULTI is set.
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: Plotting a Text Box below a plot so that also works when !P.MULTI is set. [message #13624 is a reply to message #13615] Sun, 22 November 1998 00:00 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Martin Schultz (mgs@io.harvard.edu) writes:

> Hey David!
>
> Wasn't it you yourself who told me about !x.window and !y.window which store
> the size of the current plot window? As a first try you could position your
> text with something like
> px = (!x.window[0]+!x.window[1])/2.
> py = !y.window[0]
> xyouts,px,py,yourtext,/norm,align=0.5
> and if you use the !x.margin and !y.margin keywords, you may even be able to
> prevent the plot and the text box from running into each other.

All true, but NOT, I think, with !P.Multi. For one thing, the
!X.Window parameters are not set until *after* the plot is
made. It would be possible, probably, to use !P.Multi to do
some of the nasty calculating for you. Especially with respect
to calculating the proper character size, etc. for the plots.
I did something similar with a complicated plot object I
created some time ago that had to plot itself into a window
grid. But the actual plots were drawn with the parameters
that I got from !P.Multi, not by using it directly.

> The beauty of !p.multi is that you can easily specify the number of rows and
> columns without having to go through these non-trivial calculations of the
> position parameter. I don't think one should drop this too fast.

!P.Multi is beautiful. In fact, more beautiful and useful than
most people realize. But I still think it is not the correct
choice for this particular application.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Progamming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: PV-Wave: Linux Installation Problem
Next Topic: thanks to IDL I can program this now ...

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

Current Time: Fri Oct 10 03:57:13 PDT 2025

Total time taken to generate the page: 7.84213 seconds