aboutsummaryrefslogtreecommitdiff
path: root/Findtic.f
blob: abbb56e787051a1835c3996f98cdac92db4d1406 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

      subroutine findtic (end1,end2,bigtic,smltic)
c******************************************************************************
c     this routine makes tic marks at nice round intervals.
c******************************************************************************

      implicit real*8(a-h,o-z)
      real*8 end1, end2, bigtic, smltic, span, spanlog


      span = end2 - end1
      if (span < 0.) span = - span
      spanlog = alog10(span)
      size = ifix(spanlog)
      if (spanlog < 0.) size = size - 1
      chop = spanlog - size
      if (chop < 0.31) then
         bigtic = 10.**(size)/2
         smltic = bigtic/5
      elseif (chop < 0.71) then
         bigtic = 10.**(size)
         smltic = bigtic/5
      else
         bigtic = 10.**(size)*2
         smltic = bigtic/4
      endif
      return


      end