How to use the netgraph._main.FancyArrow 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
shape = 'right'
            else:
                shape = 'full'

            if draw_arrows:
                offset = node_size[target]
                head_length = 2 * width
                head_width = 3 * width
                length_includes_head = True
            else:
                offset = None
                head_length = 1e-10 # 0 throws error
                head_width = 1e-10 # 0 throws error
                length_includes_head = False

            patch = FancyArrow(x1, y1, dx, dy,
                               width=width,
                               facecolor=color,
                               alpha=alpha,
                               head_length=head_length,
                               head_width=head_width,
                               length_includes_head=length_includes_head,
                               zorder=1,
                               edgecolor='none',
                               linewidth=0.1,
                               offset=offset,
                               shape=shape)
            ax.add_artist(patch)
            artists[(source, target)] = patch

        else: # source == target, i.e. a self-loop
            import warnings