Re: plot label help [message #10164 is a reply to message #10161] |
Fri, 10 October 1997 00:00   |
rickeym
Messages: 6 Registered: September 1997
|
Junior Member |
|
|
Here's the one I wrote. It's not a thing of beauty. It works great but
has one flaw. Instead of printing 10^0, it justs prints 10. The other
exponents print out fine. Again any help appreciated.
FUNCTION LOGTICKS, axis, index, value
IF value/10.0^9 EQ 1.0 THEN n = 9
IF value/10.0^8 EQ 1.0 THEN n = 8
IF value/10.0^7 EQ 1.0 THEN n = 7
IF value/10.0^6 EQ 1.0 THEN n = 6
IF value/10.0^5 EQ 1.0 THEN n = 5
IF value/10.0^4 EQ 1.0 THEN n = 4
IF value/10.0^3 EQ 1.0 THEN n = 3
IF value/100 EQ 1.0 THEN n = 2
IF value/10.0 EQ 1.0 THEN n = 1
IF value EQ 1.0 THEN n = 0
IF value*10.0 EQ 1.0 THEN n = -1
IF value*100 EQ 1.0 THEN n = -2
IF value*10.0^3 EQ 1.0 THEN n = -3
IF value*10.0^4 EQ 1.0 THEN n = -4
IF value*10.0^5 EQ 1.0 THEN n = -5
IF value*10.0^6 EQ 1.0 THEN n = -6
IF value*10.0^7 EQ 1.0 THEN n = -7
IF value*10.0^8 EQ 1.0 THEN n = -8
IF value*10.0^9 EQ 1.0 THEN n = -9
RETURN, STRING(n, $
FORMAT="('10!E',i2.0)")
END
Rick McDaniel
Clemson University
In article <343D09D4.2781@fz-juelich.de>, "R. Bauer"
<r.bauer@fz-juelich.de> wrote:
> Rick McDaniel wrote:
>>
>> I'm using IDL to plot a curve on a log-log scale. I want the y axis
>> labels to be in powers of 10 (i.e. 10^0, 10^1, 10^2, ect). Some times the
>> yxis is lableld the way i want, other times the axis reads 1.0, 10.0,
>> 10.0, ect. Is there a way to always have the y axis labels the way i
>> need. Thanks for any help!
>>
>> Rick McDaniel
>> rickeym@hubcap.clemson.edu
>
> you can write a function which will be called by axes
> xtickformat='my_numberformat'
>
> There is an example on page 65 reference guide idl5
>
> --
> R.Bauer
>
> Institut fuer Stratosphaerische Chemie (ICG-1)
> Forschungszentrum Juelich
> email: R.Bauer@fz-juelich.de
|
|
|