Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
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)
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
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)
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)
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,