'Explicitly determine the spacing of major and minor ticks. This
overrides the default behavior of the tickSpacing method, and disables
the effect of setTicks(). Arguments may be either *major* and *minor*,
or *levels* which is a list of (spacing, offset) tuples for each
tick level desired.
If no arguments are given, then the default behavior of tickSpacing
is enabled.
Examples::
# two levels, all offsets = 0
axis.setTickSpacing(5, 1)
# three levels, all offsets = 0
axis.setTickSpacing([(3, 0), (1, 0), (0.25, 0)])
# reset to default
axis.setTickSpacing()'

def setTickSpacing(self, major=None, minor=None, levels=None):

    if (levels is None):
        if (major is None):
            levels = None
        else:
            levels = [(major, 0), (minor, 0)]
    self._tickSpacing = levels
    self.picture = None
    self.update()
