'Set the unit for the major tick labels.
Parameters
unit : class:`~astropy.units.Unit`
The unit to which the tick labels should be converted to.'

def set_format_unit(self, unit):

    if (not issubclass(unit.__class__, u.UnitBase)):
        raise TypeError('unit    should    be    an    astropy    UnitBase    subclass')
    self._formatter_locator.format_unit = unit
