[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Log axis tickvalue format



Surendar,
I'm not aware of a simple and elegant solution, i.e. without doing
everything by yourself. However, the following short procedure might
serve as a starting point, albeit far from being mature. . I needed it
once, and it was OK for my purposes.

Every order of magnitude is labeled, which causes space problems if the
data range is more than 10 orders of magnitude or so. Then the number of
'tickVals' has to be reduced

Cheers,
Markus


PRO logPlot, x,y


;**** Normal wave ticks
 plot_oo, x,y, psym=-2
 hak
 xc=!x.crange & yc=!y.crange

;**** self-made ticks
 ytickVals=indgen(yc(1)-yc(0)+1)+yc(0)
 yticknames='10!U'+string(ytickVals, form='(I2)')+'!N'

 xtickVals=indgen(xc(1)-xc(0)+1)+xc(0)
 xticknames='10!U'+string(xtickVals, form='(I2)')+'!N'

 plot_oo, x,y, psym=-2, xrange=10.^xc, yrange=10.^yc,$
  ytickname=yticknames, ytickv=10.^ytickVals,
yticks=N_ELEMENTS(ytickVals)-1,$
  xtickname=xticknames, xtickv=10.^xtickVals,
xticks=N_ELEMENTS(xtickVals)-1


END


--
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Markus Reichstein
Department of Plant Ecology
University of Bayreuth
D-95440 Bayreuth
Germany

Ph.: +49 921 55 2061
FAX: +49 921 55 2564
e-mail: markus.reichstein@uni-bayreuth.de

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<