visu_plotly
visualize_with_plotly(input, degrees='all', display=True, highlight=None, **kwargs)
Display simplicial complexes with the plotly library.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
Simplex or SimplicialComplex
|
The structure to display. |
required |
degrees
|
int, list of int, or str
|
The (list of) simplex degree(s) to display. Default is 'all'. |
'all'
|
display
|
bool
|
If True, the figure is automatically displayed. Default is True. |
True
|
highlight
|
dict
|
Subset of simplices to highlight. If given as dict: - keys : int. simplex degrees. - values : list of int. collection of simplex indices. |
None
|
Other Parameters:
| Name | Type | Description |
|---|---|---|
show_grid |
bool
|
If True, reveals the Euclidean grid. Default is False. |
background |
tuple of int
|
RGB color code for the background. Each value should be between 0 and 255. Default is (255, 255, 255). |
title |
str
|
The title of the graph to display. Default is None. |
show |
str
|
What complex(es) to display. Should be in ['primal', 'dual', 'all']. Default is 'primal'. |
color |
str
|
The main color of the graph. Default is 'darkblue'. |
color_accent |
str
|
The color of the highlighted subset. Default is 'orange'. |
size |
int
|
Size of the glyph representing 0-simplices. Default is 10. |
width |
int
|
Thickness of lines representing 1-simplices. Default is 2. |
scaling |
float
|
Scaling factor to visualize property values. Useful when plotting cochains. Default is 1. |
window_size |
tuple of int
|
The width and height in pixels of the display window. Default is None. |
Returns:
| Type | Description |
|---|---|
Figure
|
The plotly figure object. |
See Also
_generate_plot_data_manifold : Generates plot data for simplicial manifolds. _generate_plot_data_complex : Generates plot data for simplicial complexes. _generate_plot_data_simplex : Generates plot data for simplices.
Source code in src/dxtr/visu/visu_plotly.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | |