Skip to content

Commit

Permalink
companies house example
Browse files Browse the repository at this point in the history
  • Loading branch information
rachchan committed Apr 5, 2023
1 parent 2c06a16 commit ad34913
Show file tree
Hide file tree
Showing 4 changed files with 1,585 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/python/raphtory/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ def draw_graph(graph, pos=None, arrows=True, with_labels=False, **kwds):
edge_label_kwds = {k: v for k, v in kwds.items() if k in valid_edge_label_kwds}

if pos is None:
pos = spring_layout(graph) # default to spring layout
# pos = kamada_kawai_layout(graph, scale=50)
pos = spring_layout(graph) # default to spring layout
# pos = kamada_kawai_layout(graph, scale=50)
draw_nodes(graph, pos, **node_kwds)
draw_edges(graph, pos, arrows=arrows, **edge_kwds)
if with_labels:
Expand Down Expand Up @@ -868,7 +868,7 @@ def draw_labels(
ax = plt.gca()

if labels is None:
labels = {n: n for n in list(graph.vertices().id())}
labels = {n: n.name() for n in list(graph.vertices())}

text_items = {} # there is no text collection so we'll fake one
for n, label in labels.items():
Expand Down
7 changes: 7 additions & 0 deletions python/python/raphtory/vis.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from pyvis.network import Network

def draw(
height="800px",
width=""
):
nt = Network()
Loading

0 comments on commit ad34913

Please sign in to comment.