'If floating is ``True``, the legend can be dragged with the mouse.
Otherwise, it\'s fixed in its position.
If ``pos`` is specified, the legend is moved there.'

def set_floating(self, floating, pos=None):

    if (floating == self._floating):
        return
    self._floating = floating
    if pos:
        if floating:
            self.set_pos_animated((pos - self._mouse_down_pos))
        else:
            self.set_pos_animated(pos)
