'Scale by *s* around given center point (or center of view).
*s* may be a Point or tuple (x, y).
Optionally, x or y may be specified individually. This allows the other
axis to be left unaffected (note that using a scale factor of 1.0 may
cause slight changes due to floating-point error).'

def scaleBy(self, s=None, center=None, x=None, y=None):

    if (s is not None):
        scale = Point(s)
    else:
        scale = [x, y]
    affect = [True, True]
    if ((scale[0] is None) and (scale[1] is None)):
        return
    elif (scale[0] is None):
        affect[0] = False
        scale[0] = 1.0
    elif (scale[1] is None):
        affect[1] = False
        scale[1] = 1.0
    scale = Point(scale)
    if (self.state['aspectLocked'] is not False):
        scale[0] = scale[1]
    vr = self.targetRect()
    if (center is None):
        center = Point(vr.center())
    else:
        center = Point(center)
    tl = (center + ((vr.topLeft() - center) * scale))
    br = (center + ((vr.bottomRight() - center) * scale))
    if (not affect[0]):
        self.setYRange(tl.y(), br.y(), padding=0)
    elif (not affect[1]):
        self.setXRange(tl.x(), br.x(), padding=0)
    else:
        self.setRange(QtCore.QRectF(tl, br), padding=0)
