Пример #1
0
from streamsvg import Drawing

sg = Drawing()

sg.addNode("ab", [(1, 6)])
sg.addNode("bc", [(3, 9)])
sg.addNode("ac", [(2, 5), (8, 10)])

sg.addLink("ab", "ac", 2, 5, height=0.40)
sg.addLink("ab", "bc", 3, 6)
sg.addLink("ac", "bc", 3, 5)
sg.addLink("ac", "bc", 8, 9)

sg.addTimeLine(ticks=2)
Пример #2
0
from streamsvg import Drawing

sg = Drawing(alpha=0, omega=4)

sg.addNode("u")
sg.addNode("v")
sg.addNode("w")

sg.addLink("u", "v", 1, 2)
sg.addLink("v", "w", 2, 3)

sg.addPath(((2,"u","v"), (2,"v","w")), 2, 2, color='blue', width=2)

sg.addTimeLine()
Пример #3
0
from streamsvg import Drawing

s = Drawing()

s.addNode("a")
s.addNode("b")
s.addNode("c")
s.addNode("d")

s.addLink("a", "b", 0, 4, color="#BBBBBB", width=2)
s.addLink("a", "b", 6, 9, color="#BBBBBB", width=2)
s.addLink("a", "c", 2, 5, height=0.4, width=3)
s.addLink("b", "c", 1, 8, width=3)
s.addLink("b", "d", 7, 10, height=0.4, color="#BBBBBB", width=2)
s.addLink("c", "d", 6, 9, width=3)

s.addNodeCluster("a", [(2, 5)], color="blue", width=3)
s.addNodeCluster("b", [(1, 8)], color="blue", width=3)
s.addNodeCluster("d", [(6, 9)], color="blue", width=3)

s.addTimeLine(ticks=2)
Пример #4
0
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)
Пример #5
0
from streamsvg import Drawing

sg = Drawing(alpha=0, omega=11)
sg.addNode("a", [(1, 4)])
sg.addNode("b", [(1, 5), (6, 8)])
sg.addNode("c", [(2, 5), (6, 9)])
sg.addNode("d", [(7, 9)])

sg.addLink("a", "b", 1, 4)
sg.addLink("b", "c", 2, 5)
sg.addLink("b", "c", 6, 8)
sg.addLink("c", "d", 7, 9)

sg.addTimeLine(ticks=2)
Пример #6
0
# Dark blue = 10
# Dark green = 12
# Purple = 21
# Pink = 27
from streamsvg import Drawing

s = Drawing()

s.addNode("A", color='green')
s.addNode("B", color='blue')
s.addNode("C", color='orange')
s.addNode("D", color='magenta')

s.addLink("A", "B", 2, 4)
s.addLink("A", "C", 3, 4, height=0.4)
s.addLink("B", "C", 3, 4)
s.addLink("A", "C", 6, 7)
s.addLink("C", "D", 9, 10)

s.addTimeLine(ticks=2)
Пример #7
0
from streamsvg import Drawing

sg = Drawing()
sg.addNode("a")
sg.addNode("b")
sg.addNode("c")
sg.addNode("d")

sg.addLink("a", "b", 0, 4)
sg.addLink("a", "b", 6, 9)
sg.addLink("a", "c", 2, 5, height=0.4)
sg.addLink("b", "c", 1, 8)
sg.addLink("b", "d", 7, 10, height=0.4)
sg.addLink("c", "d", 6, 9)

sg.addRectangle("a", "c", 2, 4, color='blue')
sg.addRectangle("b", "d", 7, 8, color="#FF8080")

sg.addTimeLine(ticks=2)
Пример #8
0
from streamsvg import Drawing

s = Drawing()

s.addNode("a")
s.addNode("b")
s.addNode("c")
s.addNode("d")

s.addLink("a", "c", 1, 6, height=0.40)
s.addLink("c", "d", 2, 9)
s.addLink("b", "d", 3, 10, height=0.40)
s.addLink("a", "b", 4, 5)
s.addLink("b", "c", 7, 9)

s.addTimeLine(ticks=2)

Пример #9
0
from streamsvg import Drawing

s = Drawing()

s.addNode("a")
s.addNode("b")
s.addNode("c")
s.addNode("d")
s.addNode("e")

s.addLink("a", "b", 0, 10)
s.addLink("b", "c", 0, 3)
s.addLink("a", "c", 2, 10, height=0.4)
s.addLink("c", "d", 5, 10)
s.addLink("d", "e", 0, 10)

s.addRectangle("a", "c", -0.1, 4.95, color="none", bordercolor="#AEC7E8")
s.addRectangle("d", "e", -0.1, 4.95, color="none", bordercolor="#AEC7E8")
s.addRectangle("a", "e", 5, 10.1, color="none", bordercolor="#AEC7E8")

s.addTimeLine(ticks=2)

Пример #10
0
from streamsvg import Drawing

s = Drawing(alpha=0, omega=10)

s.addNode("u")
s.addNode("v")
s.addNode("w")

s.addLink("u", "v", 1, 2)
s.addLink("v", "w", 3, 4)
s.addLink("u", "v", 5, 6)
s.addLink("v", "w", 8, 9)

s.addPath(((2, "u", "v"), (3, "v", "w")), 2, 3, color="#AEC7E8", width=2)
s.addPath(((6, "u", "v"), (8, "v", "w")), 6, 8, color="#98DF8A", width=2)
s.addPath(((4, "w", "v"), (5, "v", "u")), 4, 5, color="#FF9896", width=2)

s.addTimeLine(ticks=2)
Пример #11
0
from streamsvg import Drawing

s = Drawing(alpha=0, omega=10)

s.addNode("a", color='green')
s.addNode("u", color="none", rectangle_color="none")
s.addNode("b", color='green')
s.addNode("v", color="none", rectangle_color="none")
s.addNode("c", color='green')

s.addLink("a", "c", 1, 2, height=0.33)
s.addLink("a", "c", 3, 5, height=0.33)
s.addLink("a", "b", 4, 5)
s.addLink("a", "b", 8, 9)
s.addLink("b", "c", 2, 7)

s.addTimeLine(ticks=2)
Пример #12
0
from streamsvg import Drawing

sg = Drawing(alpha=0, omega=10)
sg.addNode("a", [(1, 4), (5, 8)])
sg.addNode("b", [(5, 9)])
sg.addNode("c", [(3, 8)])
sg.addNode("d", [(0, 0)])

sg.addLink("a", "b", 6, 8)
sg.addLink("a", "c", 3, 4, height=0.4)
sg.addLink("b", "c", 5, 8)

sg.addTimeLine(ticks=2)
Пример #13
0
from streamsvg import Drawing

s = Drawing()

s.addNode("a")
s.addNode("b")
s.addNode("c")

s.addLink("a", "b", 1, 1)
s.addLink("a", "b", 3, 3)
s.addLink("a", "b", 7, 7)
s.addLink("a", "b", 9, 9)

s.addLink("b", "c", 2, 2)
s.addLink("b", "c", 4, 4)
s.addLink("b", "c", 6, 6)
s.addLink("b", "c", 8, 8)

s.addLink("a", "c", 5, 5)

s.addParameter(0, 2, "a", 2)
s.addTimeLine(ticks=2)
Пример #14
0
from streamsvg import Drawing

s = Drawing(alpha=0, omega=13, discrete=1)

s.addNode("a")
s.addNode("b", [(1, 5), (7, 13)])
s.addNode("c", [(5, 12)])
s.addNode("d", [(1, 3)])

s.addLink("a", "b", 1, 4, direction='out')
s.addLink("a", "b", 9, 10)
s.addLink("a", "c", 6, 9, curving=0.4)
s.addLink("b", "d", 2, 3, curving=0.4)
s.addLink("b", "c", 8, 12)

s.addTimeLine(ticks=2)
Пример #15
0
from streamsvg import Drawing

sg = Drawing(alpha=0, omega=11)
sg.addNode("a")
sg.addNode("b")
sg.addNode("c")
sg.addNode("d")

sg.addLink("a", "b", 0, 4)
sg.addLink("a", "b", 7, 10)
sg.addLink("a", "c", 2, 6, height=0.4)
sg.addLink("b", "c", 1, 9)
sg.addLink("b", "d", 8, 11, height=0.4)
sg.addLink("c", "d", 7, 10)

sg.addLink("a", "b", 1, 4, width=2.5, color="blue")
sg.addLink("b", "c", 2, 5, width=2.5, color="blue")
sg.addLink("b", "c", 6, 8, width=2.5, color="blue")
sg.addLink("c", "d", 7, 9, width=2.5, color="blue")

sg.addTimeLine(ticks=2)
Пример #16
0
from streamsvg import Drawing

s = Drawing(alpha=0, omega=10)

s.addNode("a", color='green')
s.addNode("u", color='red')
s.addNode("b", color='green')
s.addNode("v", color='red')
s.addNode("c", color='green')

s.addLink("a", "u", 0, 2)
s.addLink("a", "u", 3, 9)
s.addLink("b", "u", 4, 5)
s.addLink("b", "u", 8, 10)
s.addLink("b", "v", 2, 7)
s.addLink("c", "u", 1, 5, height=0.55)
s.addLink("c", "v", 0, 8)

s.addTimeLine(ticks=2)
Пример #17
0
from streamsvg import Drawing

s = Drawing()

s.addNode("a")
s.addNode("b")
s.addNode("c", [(0,5)])

s.addLink("a","b", 5, 10)
s.addLink("b","c", 0, 5)

s.addTimeLine(ticks=2)
Пример #18
0
from streamsvg import Drawing

#s = Drawing(alpha=0, omega=5)
s = Drawing(alpha=1, omega=9)

s.addNode("a", [(1, 9)])
s.addNode("b", [(1, 9)])
s.addNode("c", [(3, 9)])

s.addLink("a", "b", 1, 4)
s.addLink("a", "b", 5, 9)
s.addLink("b", "c", 3, 9)

#s.addTimeLine(ticks=1)
#s.addTimeLine(ticks=5, marks=[(2,2)])
s.addTimeLine(ticks=2)
#s.addParameter("D", 1)
Пример #19
0
from streamsvg import Drawing

s = Drawing(alpha=0, omega=17)

s.addNode("u")
s.addNode("x")
s.addNode("v")
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)
Пример #20
0
from streamsvg import Drawing

sg = Drawing(alpha=0, omega=3)
sg.addNode("a", [(0, 1)])
sg.addNode("b")
sg.addNode("c", [(1, 3)])

sg.addLink("a", "b", 0, 1)
sg.addLink("b", "c", 1, 3)

sg.addTimeLine(ticks=1)
Пример #21
0
from streamsvg import Drawing

sg = Drawing()

sg.addNode("a")
sg.addNode("b")
sg.addNode("c")
sg.addNode("d")

sg.addLink("a", "b", 1, 2)
sg.addLink("b", "c", 3, 4)
sg.addLink("c", "d", 5, 6)
sg.addLink("a", "d", 7, 8)
sg.addLink("b", "d", 9, 10)

sg.addNodeIntervalMark("a", "d")
sg.addTimeIntervalMark(3, 8)

sg.addNodeCluster("a", [(1.9, 2.1), (6.9, 7.1)], color='blue')
sg.addNodeCluster("b", [(2, 3), (8.9, 9.1)], color='blue')
sg.addNodeCluster("c", [(2.9, 3.1), (4.9, 5.1)], color='blue')
sg.addNodeCluster("d", [(5, 7), (8.9, 9.1)], color='blue')

sg.addTimeLine(ticks=2)
Пример #22
0
from streamsvg import Drawing

sg = Drawing(alpha=0, omega=3)
sg.addNode("a", [(0, 1)])
sg.addNode("b")
sg.addNode("c", [(0, 1), (2, 3)])

sg.addLink("a", "b", 0, 1)
sg.addLink("b", "c", 0, 1)
sg.addLink("b", "c", 2, 3)

sg.addTimeLine(ticks=1)
Пример #23
0
from streamsvg import Drawing

s = Drawing()

s.addNode("a", [(0,10)])
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("a","b",7,8)
s.addLink("b","c",6,9)
s.addLink("b","d",2,3,height=0.4)
s.addLink("a","c",4.5,7.5,height=0.4)

s.addRectangle("a","c",2,4,color="blue")
s.addRectangle("b","d",7,8,color="#ff0000")

s.addTimeLine(ticks=2)

Пример #24
0
from streamsvg import Drawing

sg = Drawing()

sg.addNode("a")
sg.addNode("b")
sg.addNode("c")
sg.addNode("d")

sg.addLink("a", "b", 0, 7)
sg.addLink("b", "c", 1, 2)
sg.addLink("b", "c", 4, 8)
sg.addLink("b", "d", 9, 10)
sg.addLink("c", "d", 0, 5)

# Cluster A
sg.addNodeCluster("a", [(0, 3)], color='pink', width=3)
sg.addNodeCluster("b", [(7, 10)], color='pink', width=3)

# Cluster B
sg.addNodeCluster("b", [(2, 6)], color='blue', width=3)
sg.addNodeCluster("d", [(8, 10)], color='blue', width=3)

# Cluster C
sg.addNodeCluster("c", [(3, 8)], color='green', width=3)
sg.addNodeCluster("d", [(0, 5)], color='green', width=3)

sg.addTimeLine(ticks=2)
Пример #25
0
from streamsvg import Drawing

s = Drawing()

s.addNode("a")
s.addNode("b")
s.addNode("c")
s.addNode("d")

s.addLink("a", "b", 0, 4, color='green')
s.addLink("a", "b", 6, 8, color='green')
s.addLink("b", "c", 2, 4, color='blue')
s.addLink("b", "c", 5, 7, color='orange')
s.addLink("b", "c", 9, 10, color='orange')
s.addLink("b", "d", 3, 5, color='orange', height=0.6)
s.addLink("c", "d", 7, 10, color='magenta')

s.addTimeLine(ticks=2)
Пример #26
0
from streamsvg import Drawing

s = Drawing()

s.addNode("a", [(2, 5)])
s.addNode("b", [(1, 8)])
s.addNode("c", [(0, 0)])
s.addNode("d", [(6, 9)])

s.addLink("a", "b", 2, 4)
s.addLink("b", "d", 7, 8, height=0.4)

s.addTimeLine(ticks=2)
Пример #27
0
from streamsvg import Drawing

sg = Drawing()

sg.addNode("A", [(0, 3), (7, 10)], color='pink')
sg.addNode("B", [(2, 6), (8, 10)], color='blue')
sg.addNode("C", [(0, 8)], color='green')

sg.addLink("A", "B", 2, 3)
sg.addLink("A", "B", 9, 10)
sg.addLink("A", "C", 7, 8, height=0.6)
sg.addLink("B", "C", 4, 6)

sg.addTimeLine(ticks=2)
Пример #28
0
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", 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)
Пример #29
0
from streamsvg import Drawing

s = Drawing(alpha=0, omega=4)

s.addNode("a", [(0, 2)])
s.addNode("b")
s.addNode("c", [(2, 4)])

s.addLink("a", "b", 0, 2)
s.addLink("b", "c", 2, 4)

s.addTimeLine(ticks=1)
Пример #30
0
from streamsvg import Drawing

s = Drawing(alpha=0, omega=10)

s.addNode("a", [(4, 5)])
s.addNode("b", [(4, 5), (7, 9)])
s.addNode("c", [(4, 5), (7, 9)])
s.addNode("d", [(4, 5), (7, 9)])

s.addLink("a", "c", 4, 5, height=0.40, curving=0.5)
s.addLink("c", "d", 4, 5)
s.addLink("c", "d", 7, 9)
s.addLink("b", "d", 4, 5, height=0.40, curving=0.5)
s.addLink("b", "d", 7, 9, height=0.55, curving=0.4)
s.addLink("a", "b", 4, 5)
s.addLink("b", "c", 7, 9)

s.addTimeLine(ticks=2)