'update the data limits for patch *p*'

def _update_patch_limits(self, patch):

    if (isinstance(patch, mpatches.Rectangle) and ((not patch.get_width()) and (not patch.get_height()))):
        return
    vertices = patch.get_path().vertices
    if (vertices.size > 0):
        xys = patch.get_patch_transform().transform(vertices)
        if (patch.get_data_transform() != self.transData):
            patch_to_data = (patch.get_data_transform() - self.transData)
            xys = patch_to_data.transform(xys)
        (updatex, updatey) = patch.get_transform().contains_branch_seperately(self.transData)
        self.update_datalim(xys, updatex=updatex, updatey=updatey)
