@@ -103,9 +103,9 @@ def plot_matplotlib(
103
103
node_size = 1 ,
104
104
agg = np .nanmean ,
105
105
title = None ,
106
+ cmap = "jet" ,
106
107
width = 512 ,
107
108
height = 512 ,
108
- cmap = "jet" ,
109
109
):
110
110
"""
111
111
Draw a static plot using Matplotlib.
@@ -123,15 +123,15 @@ def plot_matplotlib(
123
123
:type agg: Callable, optional
124
124
:param title: The title to be displayed alongside the figure.
125
125
:type title: str, optional
126
+ :param cmap: The name of a colormap used to map `colors` data values,
127
+ aggregated by `agg`, to actual RGBA colors. Defaults to 'jet'.
128
+ :type cmap: str, optional
126
129
:param width: The desired width of the figure in pixels. Defaults to
127
130
512.
128
131
:type width: int, optional
129
132
:param height: The desired height of the figure in pixels. Defaults to
130
133
512
131
134
:type height: int, optional
132
- :param cmap: The name of a colormap used to map `colors` data values,
133
- aggregated by `agg`, to actual RGBA colors. Defaults to 'jet'.
134
- :type cmap: str, optional
135
135
136
136
:return: A static matplotlib figure that can be displayed on screen
137
137
and notebooks.
@@ -145,9 +145,9 @@ def plot_matplotlib(
145
145
node_size = node_size ,
146
146
agg = agg ,
147
147
title = title ,
148
+ cmap = cmap ,
148
149
width = width ,
149
150
height = height ,
150
- cmap = cmap ,
151
151
)
152
152
153
153
def plot_plotly (
@@ -156,9 +156,9 @@ def plot_plotly(
156
156
node_size = 1 ,
157
157
agg = np .nanmean ,
158
158
title = None ,
159
- width = 512 ,
160
- height = 512 ,
161
159
cmap = "jet" ,
160
+ width = None ,
161
+ height = None ,
162
162
):
163
163
"""
164
164
Draw an interactive plot using Plotly.
@@ -180,15 +180,13 @@ def plot_plotly(
180
180
and title is a list of string, each item will be used as title for
181
181
its corresponding colormap.
182
182
:type title: str, list[str], optional
183
- :param width: The desired width of the figure in pixels. Defaults to
184
- 512.
185
- :type width: int, optional
186
- :param height: The desired height of the figure in pixels. Defaults to
187
- 512.
188
- :type height: int, optional
189
183
:param cmap: The name of a colormap used to map `colors` data values,
190
184
aggregated by `agg`, to actual RGBA colors. Defaults to 'jet'.
191
185
:type cmap: str, optional
186
+ :param width: The desired width of the figure in pixels.
187
+ :type width: int, optional
188
+ :param height: The desired height of the figure in pixels.
189
+ :type height: int, optional
192
190
193
191
:return: An interactive Plotly figure that can be displayed on screen
194
192
and notebooks. For 3D embeddings, the figure requires a WebGL
@@ -201,9 +199,9 @@ def plot_plotly(
201
199
node_size = node_size ,
202
200
agg = agg ,
203
201
title = title ,
202
+ cmap = cmap ,
204
203
width = width ,
205
204
height = height ,
206
- cmap = cmap ,
207
205
)
208
206
209
207
def plot_plotly_update (
@@ -213,9 +211,9 @@ def plot_plotly_update(
213
211
node_size = None ,
214
212
agg = None ,
215
213
title = None ,
214
+ cmap = None ,
216
215
width = None ,
217
216
height = None ,
218
- cmap = None ,
219
217
):
220
218
"""
221
219
Draw an interactive plot using Plotly on a previously rendered figure.
@@ -240,15 +238,15 @@ def plot_plotly_update(
240
238
:param title: The title to be displayed alongside the figure. Defaults
241
239
to None.
242
240
:type title: str, optional
241
+ :param cmap: The name of a colormap used to map `colors` data values,
242
+ aggregated by `agg`, to actual RGBA colors. Defaults to None.
243
+ :type cmap: str, optional
243
244
:param width: The desired width of the figure in pixels. Defaults to
244
245
None.
245
246
:type width: int, optional
246
247
:param height: The desired height of the figure in pixels. Defaults to
247
248
None.
248
249
:type height: int, optional
249
- :param cmap: The name of a colormap used to map `colors` data values,
250
- aggregated by `agg`, to actual RGBA colors. Defaults to None.
251
- :type cmap: str, optional
252
250
253
251
:return: An interactive Plotly figure that can be displayed on screen
254
252
and notebooks. For 3D embeddings, the figure requires a WebGL
@@ -262,9 +260,9 @@ def plot_plotly_update(
262
260
node_size = node_size ,
263
261
agg = agg ,
264
262
title = title ,
263
+ cmap = cmap ,
265
264
width = width ,
266
265
height = height ,
267
- cmap = cmap ,
268
266
)
269
267
270
268
def plot_pyvis (
@@ -274,9 +272,9 @@ def plot_pyvis(
274
272
node_size = 1 ,
275
273
agg = np .nanmean ,
276
274
title = None ,
275
+ cmap = "jet" ,
277
276
width = 512 ,
278
277
height = 512 ,
279
- cmap = "jet" ,
280
278
):
281
279
"""
282
280
Draw an interactive HTML plot using PyVis.
@@ -298,15 +296,15 @@ def plot_pyvis(
298
296
:param title: The title to be displayed alongside the figure. Defaults
299
297
to None.
300
298
:type title: str, optional
299
+ :param cmap: The name of a colormap used to map `colors` data values,
300
+ aggregated by `agg`, to actual RGBA colors. Defaults to 'jet'.
301
+ :type cmap: str, optional
301
302
:param width: The desired width of the figure in pixels. Defaults to
302
303
512.
303
304
:type width: int, optional
304
305
:param height: The desired height of the figure in pixels. Defaults to
305
306
512.
306
307
:type height: int, optional
307
- :param cmap: The name of a colormap used to map `colors` data values,
308
- aggregated by `agg`, to actual RGBA colors. Defaults to 'jet'.
309
- :type cmap: str, optional
310
308
"""
311
309
return plot_pyvis (
312
310
self ,
@@ -315,9 +313,9 @@ def plot_pyvis(
315
313
node_size = node_size ,
316
314
agg = agg ,
317
315
title = title ,
316
+ cmap = cmap ,
318
317
width = width ,
319
318
height = height ,
320
- cmap = cmap ,
321
319
)
322
320
323
321
0 commit comments