'Create a new LegendItem and anchor it over the internal ViewBox.
Plots will be automatically displayed in the legend if they
are created with the \'name\' argument.'

def addLegend(self, size=None, offset=(30, 30)):

    self.legend = LegendItem(size, offset)
    self.legend.setParentItem(self.vb)
    return self.legend
