Re: how to force exponential format in graph labels [message #966] |
Mon, 26 April 1993 04:37 |
zawodny
Messages: 121 Registered: August 1992
|
Senior Member |
|
|
In article <1re2a0INNie9@nsat.ipp-garching.mpg.de> bds@uts.ipp-garching.mpg.de (Bruce d. Scott) writes:
> In a log-log plot whose ordinate values range from 1.e-3 to 1.e2, I
> would like to have the graph labels appear as exponentials and not
> as decimals. Is there way to force IDL (PV-Wave) to do this?
> --
> Dr Bruce Scott
Use the following function in conjunction with the XTICKFORMAT (YTICKFORMAT)
keyword to the plot function. You'll need a recent version of IDL for this to
work since this is a new feature.
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
--
Joseph M. Zawodny (KO4LW) NASA Langley Research Center
Internet: zawodny@arbd0.larc.nasa.gov MS-475, Hampton VA, 23681-0001
Packet: ko4lw@wb0tax.va.usa
|
|
|