Re: Plotting weridness with ytickname [message #8386] |
Fri, 28 February 1997 00:00 |
Kevin Ivory
Messages: 71 Registered: January 1997
|
Member |
|
|
David Kennedy wrote:
> Hi, I have this (simple) code to produce a stacked plot of
> some spectra:
> ; Set up the parameters for the plot command
> xrange = [-130, 130] ; Set by hand
> yrange = [-43, 20] ; Set by hand
> tick_values = [-40, -30, -20, -10, 0, 10, 20]
> tick_labels = [0, 10, 0, 10, 0, 10, 20]
>
> ; Plot empty frame with fiddled yaxis labelling etc
> plot, xrange, yrange, xstyle=1, ystyle=1, $
> ytickv=tick_values, ytickname=tick_labels, $
> /nodata
>
> Question - why is that when I run this code for the first time it produces
> a yaxis which is still labelled from -42 to 20? Running the same
> thing again will produce the correct labelling [0,10,0,10,0,10,20]
> though. WHY?
You might be using the buggy 4.0 IDL version: I opened a new IDL
session, pasted your code into it and got exactly what you
expected. I use IDL Version 4.0.1 (OSF alpha).
From the 4.0 -> 4.0.1 bug-fix list:
PLOT: XTICKNAME keyword does not work correctly in some instances.
Hope this helps
Kevin
--
Kevin Ivory Tel: +49 5556 979 434
Max-Planck-Institut fuer Aeronomie Fax: +49 5556 979 240
Postfach 20 mailto:kivory2@gwdg.de
D-37189 Katlenburg-Lindau, GERMANY http://www.gwdg.de/~kivory2/
|
|
|
|