HELP !!! [message #10451] |
Wed, 03 December 1997 00:00  |
Martin Schultz
Messages: 515 Registered: August 1997
|
Senior Member |
|
|
Hi,
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:
; produce some dummy data as a demo
alt10=findgen(20)*0.6
o3=alt10*10
co=o3/2.
h2o=exp((alt10+2)/2)
co_ok=indgen(20)
!p.thick=3
!p.position = [ 0.2, 0.3, 0.8, 0.8 ]
; produce profile plot
plot,o3,alt10,/nodata,color=1,xstyle=9,xrange=[0,140], $
ystyle=1,yrange=[0,12], $
xtitle='O!L3!N, CO [ppb], C!L2!NH!L2!N [ppt]', $
ytitle='altitude [km]' ;, $
title='H!L2!NO [ppmv]!C!C'
oplot,o3,alt10,color=7,thick=4
oplot,co(co_ok),alt10(co_ok),color=2,thick=4
; overlay extra x-axis for log water vapor
axis,0.5,12,/DATA,color=1,xax=1,xstyle=1,xrange=[100,20000.] ,/xlog,$
/SAVE,xtitle='H!L2!NO [ppmv]'
oplot,h2o,alt10,color=4,thick=4
; ps: aside from this, I still think that IDL is a great language !
--
------------------------------------------------------------ -------
Dr. Martin Schultz
Department for Earth&Planetary Sciences, Harvard University
186 Pierce Hall, 29 Oxford St., Cambridge, MA-02138, USA
phone: (617)-496-8318
fax : (617)-495-4551
e-mail: mgs@io.harvard.edu
IDL-homepage: http://www-as.harvard.edu/people/staff/mgs/idl/
------------------------------------------------------------ -------
|
|
|