📑  SageMath Online Mini Campus. Code Set 09

🌀   Homepage     🌀   GitHub Pages     🌀   Previous     🌀   Next     🌀   Instagram Posts     🌀   Pinterest Posts

The set of interactive pages with the following structure:

Example of Computations $\mathbb{\implies}$ Your Experiments $\mathbb{\implies}$ Python Modules $\mathbb{\implies}$ Other Languages

Example of Computations

Click the $\mathbb{activate}$ button below to display an interactive example.


@interact
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))

Your Experiments

Type your own SageMath code lines below and click the $\mathbb{evaluate}$ button.


This code cell was evaluated automatically.


Python Modules

Other Languages (R, HTML, ...)