How to use the netgraph._interactive_variants.InteractivelyConstructDestroyGraph 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 / _interactive_variants.py View on Github external
def __init__(self, *args, **kwargs):

        super(InteractivelyConstructDestroyGraph, self).__init__(*args, **kwargs)

        # link node/edge construction/destruction to key presses
        self.fig.canvas.mpl_connect('key_press_event', self._on_key_add_or_destroy)