TableOfContents

Introduction

Robert Miller is working on this project. [http://sage.math.washington.edu:9001/graph Back to main wiki]

2D Plotting

graphs.PetersenGraph().show()

attachment:petersen.png

graphs.CubeGraph(5).show(vertex_labels=False, node_size=100)

attachment:5-cube.png

graphs.CubeGraph(4).show(layout='spring')

attachment:4-cube.png

d = {}
for j in range(14):
    h = (j/14)*6
    i = floor(h)
    a = h - i; b = 1 - a # a==var3, b==var2
    r = { 0: 1, 1: b, 2: 0, 3: 0, 4: a, 5: 1 }[i]
    g = { 0: a, 1: 1, 2: 1, 3: b, 4: 0, 5: 0 }[i]
    b = { 0: 0, 1: 0, 2: a, 3: 1, 4: 1, 5: b }[i]
    d[(r, g, b)] = [j]
graphs.HeawoodGraph().show(color_dict=d)

attachment:heawood.png

G = graphs.FlowerSnark()
G.set_boundary([15,16,17,18,19])
G.show()

attachment:snark.png

C = graphs.CubeGraph(9)
color = {}
for v in C.vertices():
    b = v.count('1')/9
    g = 1 - b
    if color.has_key((0, g, b)): color[(0, g, b)].append(v)
    else: color[(0, g, b)] = [v]
C.show(vertex_labels=False, node_size=60, graph_border=True, color_dict=color, figsize=[9,8])

attachment:9-cube.png

3D Plotting

attachment:dod3d.png

attachment:4cube3d.png