Esempio n. 1
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)
Esempio n. 2
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)
Esempio n. 3
0
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)
Esempio n. 4
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=5)
s.addNodeCluster("b", [(1, 8)], color='blue', width=5)
s.addNodeCluster("d", [(6, 9)], color='blue', width=5)

s.addTimeLine(ticks=2)
Esempio n. 5
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.addNodeCluster("a", [(0,10)], color='blue',width=5)
s.addNodeCluster("a", [(1,3)], color='blue',width=7)
s.addNodeCluster("b", [(7,8)], color='blue',width=5)
s.addNodeCluster("b", [(1,3)], color='blue',width=7)
s.addNodeCluster("c", [(7,8)], color='blue',width=5)
s.addNodeCluster("d", [(2,3)], color='blue',width=7)

# $[2,3]\times\{a,b,d\} \cup [1,2]\times\{a,b\} \cup [0,10]\times\{a\} \cup [7,8]\times\{a,b,c\}$
# $[2,3]\times\{a,b,d\} \cup [1,2]\times\{a,b\} \cup [0,4]\times\{b\}$

s.addNodeCluster("a", [(1,3)], color='#FF9896',width=5)
s.addNodeCluster("b", [(0,4)], color='#FF9896',width=5)
s.addNodeCluster("d", [(2,3)], color='#FF9896',width=5)

s.addTimeLine(ticks=2)
Esempio n. 6
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)
Esempio n. 7
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, width=3)
s.addLink("a", "b", 7, 8, width=3)
s.addLink("b", "c", 6, 9, color="#BBBBBB", width=2)
s.addLink("b", "d", 2, 3, height=0.4, color="#BBBBBB", width=2)
s.addLink("a", "c", 4.5, 7.5, height=0.4, width=3)

s.addNodeCluster("b", [(1, 3), (7, 8)], color="blue", width=3)
s.addNodeCluster("c", [(4.5, 7.5)], color="blue", width=3)

s.addTimeLine(ticks=2)
Esempio n. 8
0
File: ex.py Progetto: ysig/streamsvg
from streamsvg import Drawing

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

s.addNode("u")
s.addNode("v")
s.addNode("x")
s.addNode("y", [(3,6)])

s.addNodeCluster("u", [(0.5,2)], color='blue', width=200)
s.addNodeCluster("v", color='blue')
s.addNodeCluster("u", [(6,7.5)], color="#ff0000")

s.addLink("u", "v", 1.5, 6)
s.addLink("u", "x", 1.5, 1.5, curving=0.2)
s.addLink("v", "y", 1.5, 1.5, curving=-0.2)
Esempio n. 9
0
from streamsvg import Drawing

sg = Drawing()

sg.addNode("a", [(0, 3), (7, 10)])
sg.addNode("b")
sg.addNode("c", [(0, 5)])

sg.addLink("a", "b", 0, 2)
sg.addLink("a", "b", 7, 10)
sg.addLink("b", "c", 2, 5)

# Cluster C
sg.addNodeCluster("b", [(1, 3), (6, 10)], color='blue')
sg.addNodeCluster("a", [(7, 9)], color='blue')

# Neighborhood of C, N(C)
sg.addNodeCluster("a", [(1, 2), (7, 10)], width=5, color='brown')
sg.addNodeCluster("c", [(2, 3)], width=5, color='brown')
sg.addNodeCluster("b", [(7, 9)], width=5, color='brown')

sg.addTimeLine(ticks=2)
Esempio n. 10
0
from streamsvg import Drawing

s = Drawing()

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

s.addNodeCluster("a", [(0, 1), (6, 10)], color="#AEC7E8", width=5)
s.addNodeCluster("b", [(0, 3)], color="#AEC7E8", width=5)
s.addNodeCluster("c", [(0, 1), (9, 10)], color="#AEC7E8", width=5)
s.addNodeCluster("d", [(0, 2)], color="#AEC7E8", width=5)

s.addNodeCluster("a", [(1, 4), (5, 6)], color="#98DF8A", width=5)
s.addNodeCluster("b", [(3, 4), (5, 7), (9, 10)], color="#98DF8A", width=5)
s.addNodeCluster("c", [(1, 4), (5, 7)], color="#98DF8A", width=5)
s.addNodeCluster("d", [(2, 4), (5, 7), (9, 10)], color="#98DF8A", width=5)

s.addNodeCluster("a", [(4, 5)], color="#FF9896", width=5)
s.addNodeCluster("b", [(4, 5), (7, 9)], color="#FF9896", width=5)
s.addNodeCluster("c", [(4, 5), (7, 9)], color="#FF9896", width=5)
s.addNodeCluster("d", [(4, 5), (7, 9)], color="#FF9896", width=5)

s.addTimeLine(ticks=2)
Esempio n. 11
0
from streamsvg import Drawing

sg = Drawing(alpha=0, omega=10)
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.addNodeCluster("a", [(1, 4), (5, 8)], color='blue', width=3)
sg.addNodeCluster("b", [(5, 9)], color='blue', width=3)
sg.addNodeCluster("c", [(3, 8)], color='blue', width=3)

sg.addTimeLine(ticks=2)
Esempio n. 12
0
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.addNodeCluster("a", [(0, 5)], color='blue', width=5)
s.addNodeCluster("b", [(0, 5)], color='blue', width=5)
s.addNodeCluster("c", [(0, 5)], color='blue', width=5)
s.addNodeCluster("a", [(5, 10)], color='blue', width=7)
s.addNodeCluster("b", [(5, 10)], color='blue', width=7)
s.addNodeCluster("c", [(5, 10)], color='blue', width=7)
s.addNodeCluster("d", [(5, 10)], color='blue', width=7)
s.addNodeCluster("e", [(5, 10)], color='blue', width=7)

s.addNodeCluster("a", [(5, 10)], color="#FF9896", width=5)
s.addNodeCluster("b", [(5, 10)], color="#FF9896", width=5)
s.addNodeCluster("c", [(5, 10)], color="#FF9896", width=5)
s.addNodeCluster("d", [(0, 10)], color="#FF9896", width=5)
s.addNodeCluster("e", [(0, 10)], color="#FF9896", width=5)

s.addTimeLine(ticks=2)
Esempio n. 13
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, 1, color='blue', width=3)
s.addLink("b", "d", 2, 2, color='blue', width=3)
s.addLink("a", "c", 4.5, 4.5, color='blue', width=3)
s.addLink("b", "c", 6, 6, 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(0,"b",color="#FF9896",width=2)

s.addNodeCluster("a", [(1,4.5)], color='blue', width=5)
s.addNodeCluster("b", [(0,2),(6,6)], color='blue', width=5)
s.addNodeCluster("c", [(4.5,6)], color='blue', width=5)
s.addNodeCluster("d", [(2,2)], color='blue', width=5)

s.addTimeLine(ticks=2)
Esempio n. 14
0
from streamsvg import Drawing

sg = Drawing()

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

sg.addLink("u", "v", 2, 6)
sg.addLink("v", "w", 4, 8)

sg.addNodeCluster("u", [(0, 6)], color='green')
sg.addNodeCluster("v", [(0, 6)], color='pink')
sg.addNodeCluster("w", [(0, 6)], color='blue')

sg.addTimeLine(ticks=2)
Esempio n. 15
0
from streamsvg import Drawing

s = Drawing()

s.addNode("a", [(5, 7)])
s.addNode("b", [(0, 3), (5, 7), (8, 10)])
s.addNode("c", [(0, 10)])
s.addNode("d", [(0, 2), (3, 7), (8, 10)])
s.addNode("e", [(0, 10)])
s.addNode("f", [(0, 4), (7, 10)])
s.addNode("g", [(0, 4), (5, 10)])

# wcc 1
s.addNodeCluster("a", [(5, 7)], color="#AEC7E8", width=3)
s.addNodeCluster("b", [(5, 7)], color="#AEC7E8", width=3)
# wcc 2
s.addNodeCluster("b", [(0, 3), (8, 10)], color="#FF9896", width=3)
s.addNodeCluster("c", [(0, 10)], color="#FF9896", width=3)
s.addNodeCluster("d", [(3, 7)], color="#FF9896", width=3)
# wcc 3
s.addNodeCluster("d", [(0, 2), (8, 10)], color="#98DF8A", width=3)
s.addNodeCluster("e", [(0, 10)], color="#98DF8A", width=3)
s.addNodeCluster("f", [(0, 4)], color="#98DF8A", width=3)
s.addNodeCluster("g", [(0, 4)], color="#98DF8A", width=3)
# wcc 4
s.addNodeCluster("f", [(7, 10)], color="#FFBB78", width=3)
s.addNodeCluster("g", [(5, 10)], color="#FFBB78", width=3)

s.addLink("a", "b", 5.5, 6.5)
s.addLink("b", "c", 1, 3)
s.addLink("b", "c", 9, 10)