We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Poincare visualization breaks with plotly 3.0.0    
#### Description

poincare_2d_visualization - receives the following error - 
ValueError: 
    Invalid value of type 'builtins.str' received for the 'textposition' property of scatter
        Received value: 'bottom'

#### Steps/Code/Corpus to Reproduce
Example:
```
from gensim.viz.poincare import poincare_2d_visualization
import plotly


vis = poincare_2d_visualization(model, tuples, 'Poincare Plot')
```

#### Versions
Please run the following snippet and paste the output below.
Darwin-17.2.0-x86_64-i386-64bit
Python 3.6.5 |Anaconda, Inc.| (default, Apr 26 2018, 08:42:37) 
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]
NumPy 1.14.3
SciPy 1.1.0
gensim 3.5.0
FAST_VERSION 1
Plotly 3.0.0

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `gensim/viz/poincare.py`
Content:
```
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 #
4 # Author: Jayant Jain <jayantjain1992@gmail.com>
5 # Copyright (C) 2017 Radim Rehurek <me@radimrehurek.com>
6 # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
7 
8 
9 """
10 Utilities for creating 2-D visualizations of Poincare models and Poincare distance heatmaps.
11 
12 """
13 
14 import logging
15 
16 from collections import Counter
17 import numpy as np
18 import plotly.graph_objs as go
19 
20 from gensim.models.poincare import PoincareKeyedVectors
21 
22 
23 logger = logging.getLogger(__name__)
24 
25 
26 def poincare_2d_visualization(model, tree, figure_title, num_nodes=50, show_node_labels=()):
27     """Create a 2-d plot of the nodes and edges of a 2-d poincare embedding.
28 
29     Parameters
30     ----------
31     model : :class:`~gensim.models.poincare.PoincareModel`
32         The model to visualize, model size must be 2.
33     tree : set
34         Set of tuples containing the direct edges present in the original dataset.
35     figure_title : str
36         Title of the plotted figure.
37     num_nodes : int or None
38         Number of nodes for which edges are to be plotted.
39         If `None`, all edges are plotted.
40         Helpful to limit this in case the data is too large to avoid a messy plot.
41     show_node_labels : iterable
42         Iterable of nodes for which to show labels by default.
43 
44     Returns
45     -------
46     :class:`plotly.graph_objs.Figure`
47         Plotly figure that contains plot.
48 
49     """
50     vectors = model.kv.syn0
51     if vectors.shape[1] != 2:
52         raise ValueError('Can only plot 2-D vectors')
53 
54     node_labels = model.kv.index2word
55     nodes_x = list(vectors[:, 0])
56     nodes_y = list(vectors[:, 1])
57     nodes = go.Scatter(
58         x=nodes_x, y=nodes_y,
59         mode='markers',
60         marker=dict(color='rgb(30, 100, 200)'),
61         text=node_labels,
62         textposition='bottom'
63     )
64 
65     nodes_x, nodes_y, node_labels = [], [], []
66     for node in show_node_labels:
67         vector = model.kv[node]
68         nodes_x.append(vector[0])
69         nodes_y.append(vector[1])
70         node_labels.append(node)
71     nodes_with_labels = go.Scatter(
72         x=nodes_x, y=nodes_y,
73         mode='markers+text',
74         marker=dict(color='rgb(200, 100, 200)'),
75         text=node_labels,
76         textposition='bottom'
77     )
78 
79     node_out_degrees = Counter(hypernym_pair[1] for hypernym_pair in tree)
80     if num_nodes is None:
81         chosen_nodes = list(node_out_degrees.keys())
82     else:
83         chosen_nodes = list(sorted(node_out_degrees.keys(), key=lambda k: -node_out_degrees[k]))[:num_nodes]
84 
85     edges_x = []
86     edges_y = []
87     for u, v in tree:
88         if not(u in chosen_nodes or v in chosen_nodes):
89             continue
90         vector_u = model.kv[u]
91         vector_v = model.kv[v]
92         edges_x += [vector_u[0], vector_v[0], None]
93         edges_y += [vector_u[1], vector_v[1], None]
94     edges = go.Scatter(
95         x=edges_x, y=edges_y, mode="line", hoverinfo=False,
96         line=dict(color='rgb(50,50,50)', width=1))
97 
98     layout = go.Layout(
99         title=figure_title, showlegend=False, hovermode='closest', width=800, height=800)
100     return go.Figure(data=[edges, nodes, nodes_with_labels], layout=layout)
101 
102 
103 def poincare_distance_heatmap(origin_point, x_range=(-1.0, 1.0), y_range=(-1.0, 1.0), num_points=100):
104     """Create a heatmap of Poincare distances from `origin_point` for each point (x, y),
105     where x and y lie in `x_range` and `y_range` respectively, with `num_points` points chosen uniformly in both ranges.
106 
107     Parameters
108     ----------
109     origin_point : tuple (int, int)
110         (x, y) from which distances are to be measured and plotted.
111     x_range : tuple (int, int)
112         Range for x-axis from which to choose `num_points` points.
113     y_range : tuple (int, int)
114         Range for y-axis from which to choose `num_points` points.
115     num_points : int
116         Number of points to choose from `x_range` and `y_range`.
117 
118     Notes
119     -----
120     Points outside the unit circle are ignored, since the Poincare distance is defined
121     only for points inside the circle boundaries (exclusive of the boundary).
122 
123     Returns
124     -------
125     :class:`plotly.graph_objs.Figure`
126         Plotly figure that contains plot
127 
128     """
129     epsilon = 1e-8  # Can't choose (-1.0, -1.0) or (1.0, 1.0), distance undefined
130     x_range, y_range = list(x_range), list(y_range)
131     if x_range[0] == -1.0 and y_range[0] == -1.0:
132         x_range[0] += epsilon
133         y_range[0] += epsilon
134     if x_range[0] == 1.0 and y_range[0] == 1.0:
135         x_range[0] -= epsilon
136         y_range[0] -= epsilon
137 
138     x_axis_values = np.linspace(x_range[0], x_range[1], num=num_points)
139     y_axis_values = np.linspace(x_range[0], x_range[1], num=num_points)
140     x, y = np.meshgrid(x_axis_values, y_axis_values)
141     all_points = np.dstack((x, y)).swapaxes(1, 2).swapaxes(0, 1).reshape(2, num_points ** 2).T
142     norms = np.linalg.norm(all_points, axis=1)
143     all_points = all_points[norms < 1]
144 
145     origin_point = np.array(origin_point)
146     all_distances = PoincareKeyedVectors.poincare_dists(origin_point, all_points)
147 
148     distances = go.Scatter(
149         x=all_points[:, 0],
150         y=all_points[:, 1],
151         mode='markers',
152         marker=dict(
153             size='9',
154             color=all_distances,
155             colorscale='Viridis',
156             showscale=True,
157             colorbar=go.ColorBar(
158                 title='Poincare Distance'
159             ),
160         ),
161         text=[
162             'Distance from (%.2f, %.2f): %.2f' % (origin_point[0], origin_point[1], d)
163             for d in all_distances],
164         name='',  # To avoid the default 'trace 0'
165     )
166 
167     origin = go.Scatter(
168         x=[origin_point[0]],
169         y=[origin_point[1]],
170         name='Distance from (%.2f, %.2f)' % (origin_point[0], origin_point[1]),
171         mode='markers+text',
172         marker=dict(
173             size='10',
174             color='rgb(200, 50, 50)'
175         )
176     )
177 
178     layout = go.Layout(
179         width=900,
180         height=800,
181         showlegend=False,
182         title='Poincare Distances from (%.2f, %.2f)' % (origin_point[0], origin_point[1]),
183         hovermode='closest',
184     )
185 
186     return go.Figure(data=[distances, origin], layout=layout)
187
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/gensim/viz/poincare.py b/gensim/viz/poincare.py
--- a/gensim/viz/poincare.py
+++ b/gensim/viz/poincare.py
@@ -59,7 +59,7 @@
         mode='markers',
         marker=dict(color='rgb(30, 100, 200)'),
         text=node_labels,
-        textposition='bottom'
+        textposition='bottom center'
     )
 
     nodes_x, nodes_y, node_labels = [], [], []
@@ -73,7 +73,7 @@
         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)
@@ -92,7 +92,7 @@
         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(

{"golden_diff": "diff --git a/gensim/viz/poincare.py b/gensim/viz/poincare.py\n--- a/gensim/viz/poincare.py\n+++ b/gensim/viz/poincare.py\n@@ -59,7 +59,7 @@\n         mode='markers',\n         marker=dict(color='rgb(30, 100, 200)'),\n         text=node_labels,\n-        textposition='bottom'\n+        textposition='bottom center'\n     )\n \n     nodes_x, nodes_y, node_labels = [], [], []\n@@ -73,7 +73,7 @@\n         mode='markers+text',\n         marker=dict(color='rgb(200, 100, 200)'),\n         text=node_labels,\n-        textposition='bottom'\n+        textposition='bottom center'\n     )\n \n     node_out_degrees = Counter(hypernym_pair[1] for hypernym_pair in tree)\n@@ -92,7 +92,7 @@\n         edges_x += [vector_u[0], vector_v[0], None]\n         edges_y += [vector_u[1], vector_v[1], None]\n     edges = go.Scatter(\n-        x=edges_x, y=edges_y, mode=\"line\", hoverinfo=False,\n+        x=edges_x, y=edges_y, mode=\"lines\", hoverinfo='none',\n         line=dict(color='rgb(50,50,50)', width=1))\n \n     layout = go.Layout(\n", "issue": "Poincare visualization breaks with plotly 3.0.0    \n#### Description\r\n\r\npoincare_2d_visualization - receives the following error - \r\nValueError: \r\n    Invalid value of type 'builtins.str' received for the 'textposition' property of scatter\r\n        Received value: 'bottom'\r\n\r\n#### Steps/Code/Corpus to Reproduce\r\nExample:\r\n```\r\nfrom gensim.viz.poincare import poincare_2d_visualization\r\nimport plotly\r\n\r\n\r\nvis = poincare_2d_visualization(model, tuples, 'Poincare Plot')\r\n```\r\n\r\n#### Versions\r\nPlease run the following snippet and paste the output below.\r\nDarwin-17.2.0-x86_64-i386-64bit\r\nPython 3.6.5 |Anaconda, Inc.| (default, Apr 26 2018, 08:42:37) \r\n[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]\r\nNumPy 1.14.3\r\nSciPy 1.1.0\r\ngensim 3.5.0\r\nFAST_VERSION 1\r\nPlotly 3.0.0\n", "before_files": [{"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Author: Jayant Jain <jayantjain1992@gmail.com>\n# Copyright (C) 2017 Radim Rehurek <me@radimrehurek.com>\n# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html\n\n\n\"\"\"\nUtilities for creating 2-D visualizations of Poincare models and Poincare distance heatmaps.\n\n\"\"\"\n\nimport logging\n\nfrom collections import Counter\nimport numpy as np\nimport plotly.graph_objs as go\n\nfrom gensim.models.poincare import PoincareKeyedVectors\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef poincare_2d_visualization(model, tree, figure_title, num_nodes=50, show_node_labels=()):\n    \"\"\"Create a 2-d plot of the nodes and edges of a 2-d poincare embedding.\n\n    Parameters\n    ----------\n    model : :class:`~gensim.models.poincare.PoincareModel`\n        The model to visualize, model size must be 2.\n    tree : set\n        Set of tuples containing the direct edges present in the original dataset.\n    figure_title : str\n        Title of the plotted figure.\n    num_nodes : int or None\n        Number of nodes for which edges are to be plotted.\n        If `None`, all edges are plotted.\n        Helpful to limit this in case the data is too large to avoid a messy plot.\n    show_node_labels : iterable\n        Iterable of nodes for which to show labels by default.\n\n    Returns\n    -------\n    :class:`plotly.graph_objs.Figure`\n        Plotly figure that contains plot.\n\n    \"\"\"\n    vectors = model.kv.syn0\n    if vectors.shape[1] != 2:\n        raise ValueError('Can only plot 2-D vectors')\n\n    node_labels = model.kv.index2word\n    nodes_x = list(vectors[:, 0])\n    nodes_y = list(vectors[:, 1])\n    nodes = go.Scatter(\n        x=nodes_x, y=nodes_y,\n        mode='markers',\n        marker=dict(color='rgb(30, 100, 200)'),\n        text=node_labels,\n        textposition='bottom'\n    )\n\n    nodes_x, nodes_y, node_labels = [], [], []\n    for node in show_node_labels:\n        vector = model.kv[node]\n        nodes_x.append(vector[0])\n        nodes_y.append(vector[1])\n        node_labels.append(node)\n    nodes_with_labels = go.Scatter(\n        x=nodes_x, y=nodes_y,\n        mode='markers+text',\n        marker=dict(color='rgb(200, 100, 200)'),\n        text=node_labels,\n        textposition='bottom'\n    )\n\n    node_out_degrees = Counter(hypernym_pair[1] for hypernym_pair in tree)\n    if num_nodes is None:\n        chosen_nodes = list(node_out_degrees.keys())\n    else:\n        chosen_nodes = list(sorted(node_out_degrees.keys(), key=lambda k: -node_out_degrees[k]))[:num_nodes]\n\n    edges_x = []\n    edges_y = []\n    for u, v in tree:\n        if not(u in chosen_nodes or v in chosen_nodes):\n            continue\n        vector_u = model.kv[u]\n        vector_v = model.kv[v]\n        edges_x += [vector_u[0], vector_v[0], None]\n        edges_y += [vector_u[1], vector_v[1], None]\n    edges = go.Scatter(\n        x=edges_x, y=edges_y, mode=\"line\", hoverinfo=False,\n        line=dict(color='rgb(50,50,50)', width=1))\n\n    layout = go.Layout(\n        title=figure_title, showlegend=False, hovermode='closest', width=800, height=800)\n    return go.Figure(data=[edges, nodes, nodes_with_labels], layout=layout)\n\n\ndef poincare_distance_heatmap(origin_point, x_range=(-1.0, 1.0), y_range=(-1.0, 1.0), num_points=100):\n    \"\"\"Create a heatmap of Poincare distances from `origin_point` for each point (x, y),\n    where x and y lie in `x_range` and `y_range` respectively, with `num_points` points chosen uniformly in both ranges.\n\n    Parameters\n    ----------\n    origin_point : tuple (int, int)\n        (x, y) from which distances are to be measured and plotted.\n    x_range : tuple (int, int)\n        Range for x-axis from which to choose `num_points` points.\n    y_range : tuple (int, int)\n        Range for y-axis from which to choose `num_points` points.\n    num_points : int\n        Number of points to choose from `x_range` and `y_range`.\n\n    Notes\n    -----\n    Points outside the unit circle are ignored, since the Poincare distance is defined\n    only for points inside the circle boundaries (exclusive of the boundary).\n\n    Returns\n    -------\n    :class:`plotly.graph_objs.Figure`\n        Plotly figure that contains plot\n\n    \"\"\"\n    epsilon = 1e-8  # Can't choose (-1.0, -1.0) or (1.0, 1.0), distance undefined\n    x_range, y_range = list(x_range), list(y_range)\n    if x_range[0] == -1.0 and y_range[0] == -1.0:\n        x_range[0] += epsilon\n        y_range[0] += epsilon\n    if x_range[0] == 1.0 and y_range[0] == 1.0:\n        x_range[0] -= epsilon\n        y_range[0] -= epsilon\n\n    x_axis_values = np.linspace(x_range[0], x_range[1], num=num_points)\n    y_axis_values = np.linspace(x_range[0], x_range[1], num=num_points)\n    x, y = np.meshgrid(x_axis_values, y_axis_values)\n    all_points = np.dstack((x, y)).swapaxes(1, 2).swapaxes(0, 1).reshape(2, num_points ** 2).T\n    norms = np.linalg.norm(all_points, axis=1)\n    all_points = all_points[norms < 1]\n\n    origin_point = np.array(origin_point)\n    all_distances = PoincareKeyedVectors.poincare_dists(origin_point, all_points)\n\n    distances = go.Scatter(\n        x=all_points[:, 0],\n        y=all_points[:, 1],\n        mode='markers',\n        marker=dict(\n            size='9',\n            color=all_distances,\n            colorscale='Viridis',\n            showscale=True,\n            colorbar=go.ColorBar(\n                title='Poincare Distance'\n            ),\n        ),\n        text=[\n            'Distance from (%.2f, %.2f): %.2f' % (origin_point[0], origin_point[1], d)\n            for d in all_distances],\n        name='',  # To avoid the default 'trace 0'\n    )\n\n    origin = go.Scatter(\n        x=[origin_point[0]],\n        y=[origin_point[1]],\n        name='Distance from (%.2f, %.2f)' % (origin_point[0], origin_point[1]),\n        mode='markers+text',\n        marker=dict(\n            size='10',\n            color='rgb(200, 50, 50)'\n        )\n    )\n\n    layout = go.Layout(\n        width=900,\n        height=800,\n        showlegend=False,\n        title='Poincare Distances from (%.2f, %.2f)' % (origin_point[0], origin_point[1]),\n        hovermode='closest',\n    )\n\n    return go.Figure(data=[distances, origin], layout=layout)\n", "path": "gensim/viz/poincare.py"}], "after_files": [{"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Author: Jayant Jain <jayantjain1992@gmail.com>\n# Copyright (C) 2017 Radim Rehurek <me@radimrehurek.com>\n# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html\n\n\n\"\"\"\nUtilities for creating 2-D visualizations of Poincare models and Poincare distance heatmaps.\n\n\"\"\"\n\nimport logging\n\nfrom collections import Counter\nimport numpy as np\nimport plotly.graph_objs as go\n\nfrom gensim.models.poincare import PoincareKeyedVectors\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef poincare_2d_visualization(model, tree, figure_title, num_nodes=50, show_node_labels=()):\n    \"\"\"Create a 2-d plot of the nodes and edges of a 2-d poincare embedding.\n\n    Parameters\n    ----------\n    model : :class:`~gensim.models.poincare.PoincareModel`\n        The model to visualize, model size must be 2.\n    tree : set\n        Set of tuples containing the direct edges present in the original dataset.\n    figure_title : str\n        Title of the plotted figure.\n    num_nodes : int or None\n        Number of nodes for which edges are to be plotted.\n        If `None`, all edges are plotted.\n        Helpful to limit this in case the data is too large to avoid a messy plot.\n    show_node_labels : iterable\n        Iterable of nodes for which to show labels by default.\n\n    Returns\n    -------\n    :class:`plotly.graph_objs.Figure`\n        Plotly figure that contains plot.\n\n    \"\"\"\n    vectors = model.kv.syn0\n    if vectors.shape[1] != 2:\n        raise ValueError('Can only plot 2-D vectors')\n\n    node_labels = model.kv.index2word\n    nodes_x = list(vectors[:, 0])\n    nodes_y = list(vectors[:, 1])\n    nodes = go.Scatter(\n        x=nodes_x, y=nodes_y,\n        mode='markers',\n        marker=dict(color='rgb(30, 100, 200)'),\n        text=node_labels,\n        textposition='bottom center'\n    )\n\n    nodes_x, nodes_y, node_labels = [], [], []\n    for node in show_node_labels:\n        vector = model.kv[node]\n        nodes_x.append(vector[0])\n        nodes_y.append(vector[1])\n        node_labels.append(node)\n    nodes_with_labels = go.Scatter(\n        x=nodes_x, y=nodes_y,\n        mode='markers+text',\n        marker=dict(color='rgb(200, 100, 200)'),\n        text=node_labels,\n        textposition='bottom center'\n    )\n\n    node_out_degrees = Counter(hypernym_pair[1] for hypernym_pair in tree)\n    if num_nodes is None:\n        chosen_nodes = list(node_out_degrees.keys())\n    else:\n        chosen_nodes = list(sorted(node_out_degrees.keys(), key=lambda k: -node_out_degrees[k]))[:num_nodes]\n\n    edges_x = []\n    edges_y = []\n    for u, v in tree:\n        if not(u in chosen_nodes or v in chosen_nodes):\n            continue\n        vector_u = model.kv[u]\n        vector_v = model.kv[v]\n        edges_x += [vector_u[0], vector_v[0], None]\n        edges_y += [vector_u[1], vector_v[1], None]\n    edges = go.Scatter(\n        x=edges_x, y=edges_y, mode=\"lines\", hoverinfo='none',\n        line=dict(color='rgb(50,50,50)', width=1))\n\n    layout = go.Layout(\n        title=figure_title, showlegend=False, hovermode='closest', width=800, height=800)\n    return go.Figure(data=[edges, nodes, nodes_with_labels], layout=layout)\n\n\ndef poincare_distance_heatmap(origin_point, x_range=(-1.0, 1.0), y_range=(-1.0, 1.0), num_points=100):\n    \"\"\"Create a heatmap of Poincare distances from `origin_point` for each point (x, y),\n    where x and y lie in `x_range` and `y_range` respectively, with `num_points` points chosen uniformly in both ranges.\n\n    Parameters\n    ----------\n    origin_point : tuple (int, int)\n        (x, y) from which distances are to be measured and plotted.\n    x_range : tuple (int, int)\n        Range for x-axis from which to choose `num_points` points.\n    y_range : tuple (int, int)\n        Range for y-axis from which to choose `num_points` points.\n    num_points : int\n        Number of points to choose from `x_range` and `y_range`.\n\n    Notes\n    -----\n    Points outside the unit circle are ignored, since the Poincare distance is defined\n    only for points inside the circle boundaries (exclusive of the boundary).\n\n    Returns\n    -------\n    :class:`plotly.graph_objs.Figure`\n        Plotly figure that contains plot\n\n    \"\"\"\n    epsilon = 1e-8  # Can't choose (-1.0, -1.0) or (1.0, 1.0), distance undefined\n    x_range, y_range = list(x_range), list(y_range)\n    if x_range[0] == -1.0 and y_range[0] == -1.0:\n        x_range[0] += epsilon\n        y_range[0] += epsilon\n    if x_range[0] == 1.0 and y_range[0] == 1.0:\n        x_range[0] -= epsilon\n        y_range[0] -= epsilon\n\n    x_axis_values = np.linspace(x_range[0], x_range[1], num=num_points)\n    y_axis_values = np.linspace(x_range[0], x_range[1], num=num_points)\n    x, y = np.meshgrid(x_axis_values, y_axis_values)\n    all_points = np.dstack((x, y)).swapaxes(1, 2).swapaxes(0, 1).reshape(2, num_points ** 2).T\n    norms = np.linalg.norm(all_points, axis=1)\n    all_points = all_points[norms < 1]\n\n    origin_point = np.array(origin_point)\n    all_distances = PoincareKeyedVectors.poincare_dists(origin_point, all_points)\n\n    distances = go.Scatter(\n        x=all_points[:, 0],\n        y=all_points[:, 1],\n        mode='markers',\n        marker=dict(\n            size='9',\n            color=all_distances,\n            colorscale='Viridis',\n            showscale=True,\n            colorbar=go.ColorBar(\n                title='Poincare Distance'\n            ),\n        ),\n        text=[\n            'Distance from (%.2f, %.2f): %.2f' % (origin_point[0], origin_point[1], d)\n            for d in all_distances],\n        name='',  # To avoid the default 'trace 0'\n    )\n\n    origin = go.Scatter(\n        x=[origin_point[0]],\n        y=[origin_point[1]],\n        name='Distance from (%.2f, %.2f)' % (origin_point[0], origin_point[1]),\n        mode='markers+text',\n        marker=dict(\n            size='10',\n            color='rgb(200, 50, 50)'\n        )\n    )\n\n    layout = go.Layout(\n        width=900,\n        height=800,\n        showlegend=False,\n        title='Poincare Distances from (%.2f, %.2f)' % (origin_point[0], origin_point[1]),\n        hovermode='closest',\n    )\n\n    return go.Figure(data=[distances, origin], layout=layout)\n", "path": "gensim/viz/poincare.py"}]}