Exemplo n.º 1
0
 def _repr_svg_(self):
     dot = Graph()
     values = []
     for specific, general in self.lattice:
         if specific not in values:
             values.append(specific)
             dot.node(specific)
         if general not in values:
             values.append(general)
             dot.node(general)
         dot.edge(general, specific)
     return dot._repr_svg_()
Exemplo n.º 2
0
def rand_plot():
    g = Graph()
    g.edge("a", "b")
    g.edge("b", "c")
    g.edge("c", "a")
    return g._repr_svg_()