comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Scientific Notation on Log Plots
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Scientific Notation on Log Plots [message #5793 is a reply to message #5711] Thu, 08 February 1996 00:00 Go to previous messageGo to previous message
zawodny is currently offline  zawodny
Messages: 121
Registered: August 1992
Senior Member
In article <1996Feb7.204257.12075@pinet.aip.org> boswell@pinet.aip.org (jonathan_boswell) writes:
> zawodny@arbd0.larc.nasa.gov (Joseph M Zawodny) writes:
> : Try using some variant of this function with YTICKFORMAT. I use this to
> : get "even" powers of ten, but you can hack it to give 2.3*10^3 or whatever.
>
> [snip]
>
> Thanks Joe. Your routine is very clever. However did you figure out what
> parameters to give it?
>
> For those of you who don't know about it, the YTICKFORMAT keyword can take
> not only a format specifier, such as "(F9.0)", but also a function name.
> Apparently IDL then calls the function repeatedly when labelling the axis.

You do not need to give it any parameters, IDL sees the string stored in
the YTICKFORMAT keyword and calls that function with the proper parameters
automatically for each and every tickmark it is going to label on that axis.
When you write your function, you have to use the proper parameter list
that is defined in the IDL manuals somewhere. Just copy mine - it works!

In order to make my LOGTICK function work for fractional powers of ten
you will have to recreate the mantissa from the decimal portion of the
log10 of the tick value.


logval = log10(tickvalue)
exponent = strtrim(fix(logval),2)
mantissa = strtrim(string(10.^(logval mod 1.),form='(f3.2)'),2)
newtick = mantissa+'*10!u'+exponent+'!n'

I know the variables I use here are not the same ones as in the function
I posted earlier, but you can figure it out for yourself.

Have fun,

--
Dr. Joseph M. Zawodny KO4LW NASA Langley Research Center
E-mail: J.M.Zawodny@LaRC.NASA.gov MS-475, Hampton VA, 23681-0001
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: inverse the axis
Next Topic: inverse the axis

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 07:30:18 PDT 2025

Total time taken to generate the page: 1.36281 seconds