graduate(2)

NAME
graduate - pretty axis graduations

CALLING SEQUENCE
[xi,xa,np]=graduate( xmi, xma,n1,n2)
[xi,xa,np]=graduate( xmi, xma)

PARAMETERS

xmi,xma
    : real scalars

n1, n2
    : integers with default values 3,10

xi, xa
    :real scalars

np  : integer

DESCRIPTION
graduat looks for the mimimum interval [xi,xa] and a number of tics np such that:

xi <= xmi <= xma <= xa

xa - xi / np = k(10^n),k in [1 3 5] for an integer n

n1 < np < n2

EXAMPLE
  y=(0:0.33:145.78)';
  xbasc();plot2d1('enn',0,y)
  [ymn,ymx,np]=graduate(mini(y),maxi(y))
  rect=[1,ymn,prod(size(y)),ymx];
  xbasc();plot2d1('enn',0,y,-1,'011',' ',rect,[10,3,10,np])

SEE ALSO
xsetech ,plot2d

AUTHOR
S. Steer 1992