; ; format string to produce exponential display ; in tickmarks ; ; assume tickmark on every decade ; function tickformat_exponential, axis, index, value ex = long(alog10(value)) if (ex LT 0) then begin if (ex GT -10) then begin case ex of -1: fstr = string(value,FORMAT='(f3.1)') -2: fstr = string(value,FORMAT='(f4.2)') -3: fstr = string(value,FORMAT='(f5.3)') else: fstr = string(ex,FORMAT='("10!U",i2.1,"!N")') ; fstr = string(ex,FORMAT='("10!U",i2.1,"!N")') endcase endif else begin if (ex GT -100) then begin fstr = string(ex,FORMAT='("10!U",i3.2,"!N")') endif else fstr = string(ex,FORMAT='("10!U",i4.3,"!N")') endelse endif else begin if (ex LT 10) then begin case ex of 0: fstr = '1' 1: fstr = '10' 2: fstr = '100' else: fstr = string(ex,FORMAT='("10!U",i1.1,"!N")') ; fstr = string(ex,FORMAT='("10!U",i1.1,"!N")') endcase endif else begin if (ex LT 100) then begin fstr = string(ex,FORMAT='("10!U",i2.2,"!N")') endif else fstr = string(ex,FORMAT='("10!U",i3.3,"!N")') endelse endelse return, fstr END