comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: how to force exponential format in graph labels
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: how to force exponential format in graph labels [message #966] Mon, 26 April 1993 04:37
zawodny is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: how to force exponential format in graph labels
Next Topic: Number of commands that can be recalled.

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 09:19:12 PDT 2025

Total time taken to generate the page: 0.00493 seconds