'**Arguments:**
size            Specifies the fixed size (width, height) of the legend. If
this argument is omitted, the legend will autimatically resize
to fit its contents.
offset          Specifies the offset position relative to the legend\'s parent.
Positive values offset from the left or top; negative values
offset from the right or bottom. If offset is None, the
legend must be anchored manually by calling anchor() or
positioned by calling setPos().'

def __init__(self, size=None, offset=None):

    GraphicsWidget.__init__(self)
    GraphicsWidgetAnchor.__init__(self)
    self.setFlag(self.ItemIgnoresTransformations)
    self.layout = QtGui.QGraphicsGridLayout()
    self.setLayout(self.layout)
    self.items = []
    self.size = size
    self.offset = offset
    if (size is not None):
        self.setGeometry(QtCore.QRectF(0, 0, self.size[0], self.size[1]))
