'Set the root cluster.
:param Tree root: Root tree.'

def set_root(self, root):

    self.clear()
    self._root = root
    if (root is not None):
        pen = make_pen(Qt.blue, width=1, cosmetic=True, join_style=Qt.MiterJoin)
        for node in postorder(root):
            item = DendrogramWidget.ClusterGraphicsItem(self._itemgroup)
            item.setAcceptHoverEvents(True)
            item.setPen(pen)
            item.node = node
            item.installSceneEventFilter(self)
            for branch in node.branches:
                assert (branch in self._items)
                self._cluster_parent[branch] = node
            self._items[node] = item
        self._relayout()
        self._rescale()
        self.updateGeometry()
