def _get_default_annual_spacing(nyears):
 if (nyears < 11):
  (min_spacing, maj_spacing) = (1, 1)
 elif (nyears < 20):
  (min_spacing, maj_spacing) = (1, 2)
 elif (nyears < 50):
  (min_spacing, maj_spacing) = (1, 5)
 elif (nyears < 100):
  (min_spacing, maj_spacing) = (5, 10)
 elif (nyears < 200):
  (min_spacing, maj_spacing) = (5, 25)
 elif (nyears < 600):
  (min_spacing, maj_spacing) = (10, 50)
 else:
  factor = ((nyears // 1000) + 1)
  (min_spacing, maj_spacing) = ((factor * 20), (factor * 100))
 return (min_spacing, maj_spacing)

def _get_default_annual_spacing ( nyears ) : if ( nyears < 11 ) : ( min_spacing , maj_spacing ) = ( 1 , 1 ) elif ( nyears < 20 ) : ( min_spacing , maj_spacing ) = ( 1 , 2 ) elif ( nyears < 50 ) : ( min_spacing , maj_spacing ) = ( 1 , 5 ) elif ( nyears < 100 ) : ( min_spacing , maj_spacing ) = ( 5 , 10 ) elif ( nyears < 200 ) : ( min_spacing , maj_spacing ) = ( 5 , 25 ) elif ( nyears < 600 ) : ( min_spacing , maj_spacing ) = ( 10 , 50 ) else : factor = ( ( nyears // 1000 ) + 1 ) ( min_spacing , maj_spacing ) = ( ( factor * 20 ) , ( factor * 100 ) ) return ( min_spacing , maj_spacing )
returns a default spacing between consecutive ticks for annual data .