Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

frlndiv.f

Go to the documentation of this file.
00001 
00002 c
00003 c       Copyright (c) 1986,1987,1988,1989,1990,1991,1992,1993,
00004 c       by Steve McMillan, Drexel University, Philadelphia, PA.
00005 c
00006 c       All rights reserved.
00007 c
00008 c       Redistribution and use in source and binary forms are permitted
00009 c       provided that the above copyright notice and this paragraph are
00010 c       duplicated in all such forms and that any documentation,
00011 c       advertising materials, and other materials related to such
00012 c       distribution and use acknowledge that the software was developed
00013 c       by the author named above.
00014 c
00015 c       THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
00016 c       IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
00017 c       WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00018 c
00019 
00020       subroutine fr lndiv(x1,x2,xlen,dxs,dxm,dxl)
00021         save
00022 c
00023 c     Figure out "suitable" tick spacings (neither too many nor
00024 c     too few numbers or major ticks).
00025 c
00026       dimension subt(4),subl(3)
00027       data subt/.1,.2,.25,.5/,subl/1.,2.,5./,ths,thl/.15,1.5/
00028 c
00029       dxinch = (x2-x1)/xlen
00030       call compoz(dxinch,dxpi,lpow)
00031       fac = 10.**(lpow)
00032       if (x2.lt.x1) fac = -fac
00033       scale = 1.
00034 c
00035 c     Choose small tick spacing first, (try to make them 0.1 screen
00036 c     units apart).
00037 c
00038       dipx = 1./abs(dxpi)
00039     1 do 2 i = 1,4
00040           j = i
00041           if (subt(j)*dipx .gt. ths) go to 3
00042     2 continue
00043       dipx = dipx*10.
00044       scale = scale*10.
00045       go to 1
00046 c
00047     3 xx = scale*fac
00048       dxs = subt(j)*xx
00049 c
00050 c     Now set the medium tick spacing to the next factor of ten up,
00051 c     except that we put medium ticks at half that interval (i.e. at
00052 c     the 0.5 marks) if dxs = 0.1.
00053 c
00054       dxm = xx
00055       if (j.eq.1) dxm = .5*xx
00056 c
00057 c     Finally, choose the large tick spacing (aim for thl screen
00058 c     units apart).
00059 c
00060     4 do 5 i = 1,3
00061           j = i
00062           if (subl(j)*dipx .ge. thl) go to 6
00063     5 continue
00064       scale = scale*10.
00065       dipx = dipx*10.
00066       go to 4
00067 c
00068     6 dxl = subl(j)*scale*fac
00069 c
00070 c     Make sure there are enough large ticks.
00071 c
00072       if (abs(dxl).gt..5*abs(x2-x1)) then
00073           if (j.gt.1) then
00074               j = j - 1
00075               dxl = subl(j)*scale*fac
00076           else
00077               dxl = .5*dxl
00078           end if
00079       end if
00080 c
00081       end

Generated at Sun Feb 24 09:57:00 2002 for STARLAB by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001