'Adds a legend item with the same point symbol and name as ``curve``.
If the curve\'s name contains the equal sign (=), it is split at that sign. The first part of the curve
is a used as the category, and the second part as the value.'

def add_curve(self, curve):

    i = curve.name.find('=')
    if (i == (-1)):
        cat = ''
        name = curve.name
    else:
        cat = curve.name[:i]
        name = curve.name[(i + 1):]
    self.add_item(cat, name, curve.point_item(0, 0, 0))
