'Figures out the data limit of the given line, updating self.dataLim.'

def _update_line_limits(self, line):

    path = line.get_path()
    if (path.vertices.size == 0):
        return
    line_trans = line.get_transform()
    if (line_trans == self.transData):
        data_path = path
    elif any(line_trans.contains_branch_seperately(self.transData)):
        trans_to_data = (line_trans - self.transData)
        if self.transData.is_affine:
            line_trans_path = line._get_transformed_path()
            (na_path, _) = line_trans_path.get_transformed_path_and_affine()
            data_path = trans_to_data.transform_path_affine(na_path)
        else:
            data_path = trans_to_data.transform_path(path)
    else:
        data_path = path
    if (data_path.vertices.size > 0):
        (updatex, updatey) = line_trans.contains_branch_seperately(self.transData)
        self.dataLim.update_from_path(data_path, self.ignore_existing_data_limits, updatex=updatex, updatey=updatey)
        self.ignore_existing_data_limits = False
