Re: HELP !!! [message #10450] |
Wed, 03 December 1997 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Martin Schultz (mgs@io.harvard.edu) screams for help when he writes:
> after spending more than 1 hour on this, I finally decided that this
> should definitively get improved in a future release of IDL (I guess I
> should put together some kind of a wishlist for the people at RSI):
>
> problem is, I want to produce a plot with two x-axis, one on the bottom
> (easy of course :-) and one on the top. The little code piece I attached
> works fine *except* the title of the top axis is too low and interferes
> with the axis labels. I tried several things:
> - append a sequence of !C's at the end of xtitle ==> no effect at
> all
> - add another axis statement shifted somewhat higher and suppress
> the axis itself using xstyle=4 and xticks=1 ==> title comes out
> fine now, but the axis is *not* suppressed
> - use a title parameter in the call to plot ==> font is larger
> (hence ugly)
>
> I browsed around the help pages for at least 1/2 hour and could not find
> *anything* about this issue, so i guess that's the minimum that would
> need improvement!
>
> Here's the code:
[ Pretty good code snipped...although I think you left out Tek_Color]
When Martin shouts with three exclamation points, I know he
is serious!!! So I dropped what I was doing (I am utterly sick
of writing this book anyway!!!!!) and offer this:
If you are fond of hacks (it would appear so from your
harried missive), you could try this as the XTitle of your
second axis:
xtitle='!AH!A!U2!N!AO !A[!Ap!Ap!Am!Av!A]'
But this is *way* too ugly for my taste. Since you know
where your plot is going, just leave the XTitle off and
place the axis title with XYOutS. I offer this:
xyouts, 0.5, 0.88, /Normal, Align=0.5, 'H!L2!NO [ppmv]'
Whala! Simple, nice, and if it isn't *exactly* where you
want it, just move it. :-)
Cheers,
David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|