Skip to content

Commit

Permalink
Fix poincate viz incompatibility with plotly>=3.0.0 (#2226)
Browse files Browse the repository at this point in the history
* modify phrasegrams

* fix bug

* revert non-relevant phrases change
  • Loading branch information
jenishah authored and menshikh-iv committed Jan 9, 2019
1 parent 9b28532 commit 8b558c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gensim/viz/poincare.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def poincare_2d_visualization(model, tree, figure_title, num_nodes=50, show_node
mode='markers',
marker=dict(color='rgb(30, 100, 200)'),
text=node_labels,
textposition='bottom'
textposition='bottom center'
)

nodes_x, nodes_y, node_labels = [], [], []
Expand All @@ -73,7 +73,7 @@ def poincare_2d_visualization(model, tree, figure_title, num_nodes=50, show_node
mode='markers+text',
marker=dict(color='rgb(200, 100, 200)'),
text=node_labels,
textposition='bottom'
textposition='bottom center'
)

node_out_degrees = Counter(hypernym_pair[1] for hypernym_pair in tree)
Expand All @@ -92,7 +92,7 @@ def poincare_2d_visualization(model, tree, figure_title, num_nodes=50, show_node
edges_x += [vector_u[0], vector_v[0], None]
edges_y += [vector_u[1], vector_v[1], None]
edges = go.Scatter(
x=edges_x, y=edges_y, mode="line", hoverinfo=False,
x=edges_x, y=edges_y, mode="lines", hoverinfo='none',
line=dict(color='rgb(50,50,50)', width=1))

layout = go.Layout(
Expand Down

0 comments on commit 8b558c1

Please sign in to comment.