Re: Scientific Notation on Log Plots [message #5705] |
Wed, 07 February 1996 00:00  |
zawodny
Messages: 121 Registered: August 1992
|
Senior Member |
|
|
In article <1996Feb6.190450.24847@pinet.aip.org> boswell@pinet.aip.org (jonathan_boswell) writes:
>
> I've got a bizarre formatting problem going on with IDL V4.0.1 on an Alpha
> VMS machine. When I make a plot with the /ylog keyword, my plot comes out
> with neatly labelled scientific notation on the y axis. The notation actually
> has a number, followed by an asterisk, followed by a 10, and finally with an
> actual superscript number for the exponent. But I need to take control of
> the format using, for example, the ytickformat keyword. Only problem: the
> format reverts to normal FORTRAN-style formatting, with a nn.nE+mm style.
> In other words, the default neat exponential format goes away.
>
> Is there any way to control the formatting of the default scientific notation?
>
> Jonathan Boswell
> FDA/CDRH
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.
function LOGTICK,axis,index,value
; This function will provide tick labels which are powers of 10
exponent = alog10(value)
if((exponent mod 1.) ne 0.) then begin
print,!msg_prefix+'Tickmark value not an integer power of 10.'
print,!msg_prefix+'Routine LOGTICK'
pref = '~'
endif else pref = ''
return,pref+'10!U'+strtrim(fix(exponent),2)+'!N'
end
--
Dr. Joseph M. Zawodny KO4LW NASA Langley Research Center
E-mail: J.M.Zawodny@LaRC.NASA.gov MS-475, Hampton VA, 23681-0001
|
|
|