axis and the like [message #10440] |
Thu, 04 December 1997 00:00  |
Martin Schultz
Messages: 515 Registered: August 1997
|
Senior Member |
|
|
David Fanning wrote:
>
> Martin Schultz (mgs@io.harvard.edu) screams for help when he writes:
> [...]
the solution is
xyouts, 0.5, 0.88, /Normal, Align=0.5, 'H!L2!NO [ppmv]'
Uff! Thanks David! I was actually thinking of xyouts too, but in my
vicious circle I was too stubborn to abandon the idea that this should
be possible with the axis command.
The other thing I came across today again (it happens about once every
two months, but I always forget the solution to it) is how to switch off
the axis labeling (answer: [xyz]tick... -see, I forgot again- ...name =
replicate(" ",30) ). This is useful if one wants to stack a few plots
that share a common x axis and display different species or the same
species at different altitudes etc. Wouldn't it be nice to have a simple
/NOLABEL option with the plot command ? In fact, this would have one
other advantage (or do I miss something here?): If you loop through your
plots, you could write something like:
for i=0,nplots-1 do begin
!p.position=[llx,lly(i),llx+wx,lly(i)+wy]
if (i eq 0) then nolabel=0 else nolabel=1
plot,x,y(i,*),...,nolabel=nolabel
endfor
I don't see any way how one could do this now, except copying the plot
command with all the thousand parameters and have one including the
tickname statement and the other without.
Regards,
Martin.
------------------------------------------------------------ -------
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/
------------------------------------------------------------ -------
|
|
|
Re: axis and the like [message #10527 is a reply to message #10440] |
Fri, 05 December 1997 00:00  |
Kevin Ivory
Messages: 71 Registered: January 1997
|
Member |
|
|
David Fanning wrote:
> Kevin Ivory and Tim Osborn both came up with the same
> method for suppressing axis labels. Kevin wrote:
Actually, I was more proud of the second method that doesn't call
another external function. ;-)
> But what I've always done (and I am ashamed to say I
> don't even *really* know why it works) is this:
>
> Plot, data, XTickformat='(A1)'
The answer is, you are printing the first character of whatever STRING
makes of your numerical tick value. In most cases that will be a space.
To get the idea of what happens, compare
print, format='(a)', 1.
and
print, format='(a1)', 1.
I tried to find an example where your method fails, but that is not as
easy as I thought - perhaps impossible.
Cheers
Kevin
--
Kevin Ivory Tel: +49 5556 979 434
Max-Planck-Institut fuer Aeronomie Fax: +49 5556 979 240
Max-Planck-Str. 2 mailto:Kevin.Ivory@linmpi.mpg.de
D-37191 Katlenburg-Lindau, GERMANY http://www.gwdg.de/~kivory2/
|
|
|