Refer to FigureFactory.create_scatterplotmatrix() for docstring Returns fig for scatterplotmatrix with both index and colormap picked
(
dataframe,
headers,
diag,
size,
height,
width,
title,
index,
index_vals,
endpts,
colormap,
colormap_type,
**kwargs,
)
| 355 | |
| 356 | |
| 357 | def scatterplot_theme( |
| 358 | dataframe, |
| 359 | headers, |
| 360 | diag, |
| 361 | size, |
| 362 | height, |
| 363 | width, |
| 364 | title, |
| 365 | index, |
| 366 | index_vals, |
| 367 | endpts, |
| 368 | colormap, |
| 369 | colormap_type, |
| 370 | **kwargs, |
| 371 | ): |
| 372 | """ |
| 373 | Refer to FigureFactory.create_scatterplotmatrix() for docstring |
| 374 | |
| 375 | Returns fig for scatterplotmatrix with both index and colormap picked |
| 376 | |
| 377 | """ |
| 378 | |
| 379 | # Check if index is made of string values |
| 380 | if isinstance(index_vals[0], str): |
| 381 | unique_index_vals = [] |
| 382 | for name in index_vals: |
| 383 | if name not in unique_index_vals: |
| 384 | unique_index_vals.append(name) |
| 385 | n_colors_len = len(unique_index_vals) |
| 386 | |
| 387 | # Convert colormap to list of n RGB tuples |
| 388 | if colormap_type == "seq": |
| 389 | foo = clrs.color_parser(colormap, clrs.unlabel_rgb) |
| 390 | foo = clrs.n_colors(foo[0], foo[1], n_colors_len) |
| 391 | theme = clrs.color_parser(foo, clrs.label_rgb) |
| 392 | |
| 393 | if colormap_type == "cat": |
| 394 | # leave list of colors the same way |
| 395 | theme = colormap |
| 396 | |
| 397 | dim = len(dataframe) |
| 398 | fig = make_subplots(rows=dim, cols=dim, print_grid=False) |
| 399 | trace_list = [] |
| 400 | legend_param = 0 |
| 401 | # Work over all permutations of list pairs |
| 402 | for listy in dataframe: |
| 403 | for listx in dataframe: |
| 404 | # create a dictionary for index_vals |
| 405 | unique_index_vals = {} |
| 406 | for name in index_vals: |
| 407 | if name not in unique_index_vals: |
| 408 | unique_index_vals[name] = [] |
| 409 | |
| 410 | c_indx = 0 # color index |
| 411 | # Fill all the rest of the names into the dictionary |
| 412 | for name in sorted(unique_index_vals.keys()): |
| 413 | new_listx = [] |
| 414 | new_listy = [] |
no test coverage detected