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

Re: axis in scientific notation



Andrew wrote:
> 
> Hi.  I would have thought this is a FAQ, but
> I could not find anything in teh Deja archives.
> 
> I have a graph in IDL direct graphics and
> IDL is writing the Y-axis in "scientific" or
> exponential notation -- i.e. 3.0x10^4 etc.
> 
> Is there a way to force normal notation?
> 
> I know I could draw my own ticks with custom
> labels or whatever --- I'm wondering if there
> is an easier way, tho.

Use the X/Y/Z TICKFORMAT keyword, e.g.

IDL> plot, sin(findgen(200) * 0.1), ytickformat='(e9.2)'

e9.2 means 9 characters (including sign and exponent) with 2 characters
after the decimal point.

Cheers,
Liam.