Re: One title to rule them all... [message #57570 is a reply to message #57569] |
Thu, 13 December 2007 06:34   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Lasse Clausen writes:
> suppose I have a plot consisting of four panels on top of each other.
> Let's also suppose all are showing the same quantity, just measured by
> different instruments. Since the y axis title is rather longish - like
> 'Compressional Component [nT]' - I would like one ytitle for all 4
> panels.
>
> I know that I could use YXOUTS to place a string next to the axes,
> however I would need to work out exactly where to place it, so that it
> appears centered. And I am anal about these things, if the title is
> not exactly in the middle it will annoy the heck out of me. So I could
> go about and use XYOUTS with negative character size to then have the
> width of the string and so on and so on and so on... veeery
> complicated. Though, now that I come to think of it, the time it takes
> me to write this article would have been enough to write a little
> procedure...
>
> Anyway, I thought about using PLOT, /NODATA or AXIS but if I set
> YSTYLE=5, then the title is also not drawn, which doesn't really help.
> I also thought about drawing the axis in !P.BACKGROUND but... well, I
> let you work out how pointless this approach is...
No one is more anal about these kinds of things than I am,
but this doesn't seem like a particularly big deal to me.
Do everything in normalized coordinates. You can find you
bearings with [!X, !Y].window. You can easily rotate your
title text with XYOUTS and center it with ALIGNMENT=0.5,
no need to fuss about string length at all. The AXIS
command will put an axis anywhere you like.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|