s.addNode("y") s.addNode("w") s.addLink("u", "x", 1, 2) s.addLink("u", "x", 9, 10) s.addLink("x", "v", 3, 4) s.addLink("x", "v", 11, 12) s.addLink("v", "y", 5, 6) s.addLink("v", "y", 13, 14) s.addLink("y", "w", 7, 8) s.addLink("y", "w", 15, 16) s.addPath(((2, "u", "x"), (3.5, "x", "v"), (5.5, "v", "y"), (7, "y", "w")), 2, 7, color='blue', width=2) s.addPath(((10, "u", "x"), (11.5, "x", "v"), (13.5, "v", "y"), (15, "y", "w")), 10, 15, color='green', width=2) s.addTimeNodeMark(4.5, "v", color="#FF0000", width=1) s.addTimeLine(ticks=80, marks=[(0, ""), (2, 2), (7, 7), (10, 10), (15, 15), (3, "a"), (4, "b"), (5, "c"), (6, "d"), (11, "e"), (12, "f"), (13, "g"), (14, "h")]) #s.addTimeLine(ticks=2)
from streamsvg import Drawing s = Drawing() s.addNode("a") s.addNode("b", [(0, 4), (5, 10)]) s.addNode("c", [(4, 9)]) s.addNode("d", [(1, 3)]) s.addLink("a", "b", 1, 3) s.addLink("b", "d", 2, 3) s.addLink("a", "c", 4.5, 7.5, height=0.40) s.addLink("a", "b", 7, 8) s.addLink("b", "c", 6, 9) s.addTimeNodeMark(1, "d", color="#FF9896", width=2) s.addTimeNodeMark(9, "c", color="#FF9896", width=2) s.addPath([(2, "d", "b"), (3, "b", "a"), (5, "a", "c")], 2, 5, color='blue', width=2) s.addTimeLine(ticks=2)
s = Drawing() s.addNode("a") s.addNode("b", [(0,4), (5,10)]) s.addNode("c", [(4,9)]) s.addNode("d", [(1,3)]) s.addLink("a", "b", 2, 2, color='blue', width=3) s.addLink("b", "d", 2, 2, color='blue', width=3) s.addLink("a", "c", 5, 5, color='blue', width=3) s.addLink("b", "c", 6, 6, color='blue', width=3) s.addLink("b", "c", 7, 7, color='blue', width=3) s.addLink("b", "c", 8, 8, color='blue', width=3) s.addLink("a", "b", 8, 8, color='blue', width=3) s.addLink("a", "b", 1, 3) s.addLink("b", "d", 2, 3) s.addLink("a", "c", 4.5, 7.5, height=0.40) s.addLink("a", "b", 7, 8) s.addLink("b", "c", 6, 9) s.addTimeNodeMark(2, "b", color="#FF9896", width=2) s.addNodeCluster("a", [(2,6),(8,9)], color='blue', width=5) s.addNodeCluster("b", [(6,7),(8,10)], color='blue', width=5) s.addNodeCluster("c", [(5,6),(7,9)], color='blue', width=5) s.addNodeCluster("d", [(2,3)], color='blue', width=5) s.addTimeLine(ticks=2)