'Convenience method for simple axis view autoscaling.
See :meth:`matplotlib.axes.Axes.autoscale` for full explanation.
Note that this function behaves the same, but for all
three axes.  Therfore, \'z\' can be passed for *axis*,
and \'both\' applies to all three axes.
.. versionadded :: 1.1.0
This function was added, but not tested. Please report any bugs.'

def autoscale(self, enable=True, axis=u'both', tight=None):

    if (enable is None):
        scalex = True
        scaley = True
        scalez = True
    else:
        if (axis in [u'x', u'both']):
            self._autoscaleXon = scalex = bool(enable)
        else:
            scalex = False
        if (axis in [u'y', u'both']):
            self._autoscaleYon = scaley = bool(enable)
        else:
            scaley = False
        if (axis in [u'z', u'both']):
            self._autoscaleZon = scalez = bool(enable)
        else:
            scalez = False
    self.autoscale_view(tight=tight, scalex=scalex, scaley=scaley, scalez=scalez)
