How to use the netgraph._main.RegularPolygon 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
radius=size,
                                numVertices=5,
                                facecolor=facecolor,
                                alpha=alpha,
                                linewidth=0.,
                                zorder=zorder)
    elif shape == 'h': # hexagon
        artist = RegularPolygon(xy=position,
                                radius=size,
                                numVertices=6,
                                facecolor=facecolor,
                                alpha=alpha,
                                linewidth=0.,
                                zorder=zorder)
    elif shape == 8: # octagon
        artist = RegularPolygon(xy=position,
                                radius=size,
                                numVertices=8,
                                facecolor=facecolor,
                                alpha=alpha,
                                linewidth=0.,
                                zorder=zorder)
    else:
        raise ValueError("Node shape one of: ''so^>v
github paulbrodersen / netgraph / netgraph / _main.py View on Github external
facecolor=facecolor,
                                alpha=alpha,
                                orientation=0,
                                linewidth=0.,
                                zorder=zorder)
    elif shape == '<': # triangle left
        artist = RegularPolygon(xy=position,
                                radius=size,
                                numVertices=3,
                                facecolor=facecolor,
                                alpha=alpha,
                                orientation=np.pi*0.5,
                                linewidth=0.,
                                zorder=zorder)
    elif shape == 'v': # triangle down
        artist = RegularPolygon(xy=position,
                                radius=size,
                                numVertices=3,
                                facecolor=facecolor,
                                alpha=alpha,
                                orientation=np.pi,
                                linewidth=0.,
                                zorder=zorder)
    elif shape == '>': # triangle right
        artist = RegularPolygon(xy=position,
                                radius=size,
                                numVertices=3,
                                facecolor=facecolor,
                                alpha=alpha,
                                orientation=np.pi*1.5,
                                linewidth=0.,
                                zorder=zorder)
github paulbrodersen / netgraph / netgraph / _main.py View on Github external
numVertices=4,
                                facecolor=facecolor,
                                alpha=alpha,
                                orientation=np.pi*0.5,
                                linewidth=0.,
                                zorder=zorder)
    elif shape == 'p': # pentagon
        artist = RegularPolygon(xy=position,
                                radius=size,
                                numVertices=5,
                                facecolor=facecolor,
                                alpha=alpha,
                                linewidth=0.,
                                zorder=zorder)
    elif shape == 'h': # hexagon
        artist = RegularPolygon(xy=position,
                                radius=size,
                                numVertices=6,
                                facecolor=facecolor,
                                alpha=alpha,
                                linewidth=0.,
                                zorder=zorder)
    elif shape == 8: # octagon
        artist = RegularPolygon(xy=position,
                                radius=size,
                                numVertices=8,
                                facecolor=facecolor,
                                alpha=alpha,
                                linewidth=0.,
                                zorder=zorder)
    else:
        raise ValueError("Node shape one of: ''so^>v
github paulbrodersen / netgraph / netgraph / _main.py View on Github external
radius=size,
                                           facecolor=facecolor,
                                           alpha=alpha,
                                           linewidth=0.,
                                           zorder=zorder)
    elif shape == '^': # triangle up
        artist = RegularPolygon(xy=position,
                                radius=size,
                                numVertices=3,
                                facecolor=facecolor,
                                alpha=alpha,
                                orientation=0,
                                linewidth=0.,
                                zorder=zorder)
    elif shape == '<': # triangle left
        artist = RegularPolygon(xy=position,
                                radius=size,
                                numVertices=3,
                                facecolor=facecolor,
                                alpha=alpha,
                                orientation=np.pi*0.5,
                                linewidth=0.,
                                zorder=zorder)
    elif shape == 'v': # triangle down
        artist = RegularPolygon(xy=position,
                                radius=size,
                                numVertices=3,
                                facecolor=facecolor,
                                alpha=alpha,
                                orientation=np.pi,
                                linewidth=0.,
                                zorder=zorder)
github paulbrodersen / netgraph / netgraph / _main.py View on Github external
facecolor=facecolor,
                                alpha=alpha,
                                orientation=np.pi,
                                linewidth=0.,
                                zorder=zorder)
    elif shape == '>': # triangle right
        artist = RegularPolygon(xy=position,
                                radius=size,
                                numVertices=3,
                                facecolor=facecolor,
                                alpha=alpha,
                                orientation=np.pi*1.5,
                                linewidth=0.,
                                zorder=zorder)
    elif shape == 's': # square
        artist = RegularPolygon(xy=position,
                                radius=size,
                                numVertices=4,
                                facecolor=facecolor,
                                alpha=alpha,
                                orientation=np.pi*0.25,
                                linewidth=0.,
                                zorder=zorder)
    elif shape == 'd': # diamond
        artist = RegularPolygon(xy=position,
                                radius=size,
                                numVertices=4,
                                facecolor=facecolor,
                                alpha=alpha,
                                orientation=np.pi*0.5,
                                linewidth=0.,
                                zorder=zorder)
github paulbrodersen / netgraph / netgraph / _main.py View on Github external
facecolor=facecolor,
                                alpha=alpha,
                                orientation=np.pi*0.25,
                                linewidth=0.,
                                zorder=zorder)
    elif shape == 'd': # diamond
        artist = RegularPolygon(xy=position,
                                radius=size,
                                numVertices=4,
                                facecolor=facecolor,
                                alpha=alpha,
                                orientation=np.pi*0.5,
                                linewidth=0.,
                                zorder=zorder)
    elif shape == 'p': # pentagon
        artist = RegularPolygon(xy=position,
                                radius=size,
                                numVertices=5,
                                facecolor=facecolor,
                                alpha=alpha,
                                linewidth=0.,
                                zorder=zorder)
    elif shape == 'h': # hexagon
        artist = RegularPolygon(xy=position,
                                radius=size,
                                numVertices=6,
                                facecolor=facecolor,
                                alpha=alpha,
                                linewidth=0.,
                                zorder=zorder)
    elif shape == 8: # octagon
        artist = RegularPolygon(xy=position,