How to use the netgraph._main.DraggableArtists.__init__ function in netgraph

To help you get started, we’ve selected a few netgraph examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github paulbrodersen / netgraph / netgraph / _main.py View on Github external
def __init__(self, *args, **kwargs):
        Graph.__init__(self, *args, **kwargs)
        DraggableArtists.__init__(self, self.node_face_artists.values())

        self._node_to_draggable_artist = self.node_face_artists
        self._draggable_artist_to_node = dict(zip(self.node_face_artists.values(), self.node_face_artists.keys()))

        # trigger resize of labels when canvas size changes
        self.fig.canvas.mpl_connect('resize_event', self._on_resize)