'Calculate transforms immediately before drawing.'

def _set_transforms(self):

    ax = self.axes
    fig = self.figure
    if (self._units == u'xy'):
        sc = 1
    elif (self._units == u'x'):
        sc = (ax.bbox.width / ax.viewLim.width)
    elif (self._units == u'y'):
        sc = (ax.bbox.height / ax.viewLim.height)
    elif (self._units == u'inches'):
        sc = fig.dpi
    elif (self._units == u'points'):
        sc = (fig.dpi / 72.0)
    elif (self._units == u'width'):
        sc = ax.bbox.width
    elif (self._units == u'height'):
        sc = ax.bbox.height
    elif (self._units == u'dots'):
        sc = 1.0
    else:
        raise ValueError((u'unrecognized    units:    %s' % self._units))
    self._transforms = np.zeros((len(self._widths), 3, 3))
    widths = (self._widths * sc)
    heights = (self._heights * sc)
    sin_angle = np.sin(self._angles)
    cos_angle = np.cos(self._angles)
    self._transforms[:, 0, 0] = (widths * cos_angle)
    self._transforms[:, 0, 1] = (heights * (- sin_angle))
    self._transforms[:, 1, 0] = (widths * sin_angle)
    self._transforms[:, 1, 1] = (heights * cos_angle)
    self._transforms[:, 2, 2] = 1.0
    _affine = transforms.Affine2D
    if (self._units == u'xy'):
        m = ax.transData.get_affine().get_matrix().copy()
        m[:2, 2:] = 0
        self.set_transform(_affine(m))
