xxxxxxxxxx
import warnings; warnings.filterwarnings('ignore')
def _(n=[95,90,..,5]):
g=graphs.CubeGraph(4); edge_colors={};
c=[colormaps.hsv(n*i)[:3] for i in [0..3]]
for i in [0..3]: edge_colors[c[i]]=[]
for u,v,l in g.edges():
[edge_colors[c[i]].append((u,v,l))
for i in [0..3] if u[i]!=v[i]]
g=g.graphplot(
edge_colors=edge_colors,edge_thickness=2.5,
vertex_labels=False,vertex_size=0)
g.show(figsize=(5,5))
No comments:
Post a Comment