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

Home » Public Forums » archive » Re: Scientific Notation on Log Plots
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: Scientific Notation on Log Plots [message #5705] Wed, 07 February 1996 00:00
zawodny is currently offline  zawodny
Messages: 121
Registered: August 1992
Senior Member
In article <1996Feb6.190450.24847@pinet.aip.org> boswell@pinet.aip.org (jonathan_boswell) writes:
>
> I've got a bizarre formatting problem going on with IDL V4.0.1 on an Alpha
> VMS machine. When I make a plot with the /ylog keyword, my plot comes out
> with neatly labelled scientific notation on the y axis. The notation actually
> has a number, followed by an asterisk, followed by a 10, and finally with an
> actual superscript number for the exponent. But I need to take control of
> the format using, for example, the ytickformat keyword. Only problem: the
> format reverts to normal FORTRAN-style formatting, with a nn.nE+mm style.
> In other words, the default neat exponential format goes away.
>
> Is there any way to control the formatting of the default scientific notation?
>
> Jonathan Boswell
> FDA/CDRH

Try using some variant of this function with YTICKFORMAT. I use this to
get "even" powers of ten, but you can hack it to give 2.3*10^3 or whatever.

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

--
Dr. Joseph M. Zawodny KO4LW NASA Langley Research Center
E-mail: J.M.Zawodny@LaRC.NASA.gov MS-475, Hampton VA, 23681-0001
Re: Scientific Notation on Log Plots [message #5710 is a reply to message #5705] Tue, 06 February 1996 00:00 Go to previous message
safier is currently offline  safier
Messages: 12
Registered: March 1995
Junior Member
>>>> > "jonathan" == jonathan boswell <boswell@pinet.aip.org> writes:

jonathan> I've got a bizarre formatting problem going on with IDL
jonathan> V4.0.1 on an Alpha VMS machine. When I make a plot with
jonathan> the /ylog keyword, my plot comes out with neatly
jonathan> labelled scientific notation on the y axis. The
jonathan> notation actually has a number, followed by an asterisk,
jonathan> followed by a 10, and finally with an actual superscript
jonathan> number for the exponent. But I need to take control of
jonathan> the format using, for example, the ytickformat keyword.
jonathan> Only problem: the format reverts to normal FORTRAN-style
jonathan> formatting, with a nn.nE+mm style. In other words, the
jonathan> default neat exponential format goes away.

jonathan> Is there any way to control the formatting of the
jonathan> default scientific notation?

jonathan> Jonathan Boswell FDA/CDRH

I do not know whether you can control scientific notation, but you
can specify the labels by using ytickname. I usually use the defaults,
and if I do not like the format, I force the labels with ytickname.

Cheers,

Pedro
--
Pedro N. Safier | "God offers to everyone his
Department of Astronomy | choice between truth and repose.
U. of Maryland at College Park | Take which you please--you can
phone: 301-405-1531; fax: 301-314-9067 | never have both." R. W. Emerson
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: unformatted strings (reading)
Next Topic: Re: Labels for Map Meridians, Parallels

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

Current Time: Wed Oct 08 15:14:31 PDT 2025

Total time taken to generate the page: 0.00760 seconds