netchos.circular¶
- netchos.circular(conn, nodes_data=None, categories=None, nodes_name=None, nodes_color=None, nodes_size=None, nodes_size_min=1, nodes_size_max=10, nodes_cmap='plasma', nodes_text=None, nodes_text_offset=1.0, nodes_text_size=12, edges_min=None, edges_max=None, edges_width_min=0.5, edges_width_max=6, edges_opacity_min=0.1, edges_opacity_max=1.0, edges_cmap='plasma', cbar=True, cbar_title='Edges', directed=False, angle_start=90, angle_range=360, fig=None, kw_trace={}, kw_cbar={})[source]¶
Network plotting within a circular layout.
- Parameters
- connarray_like or DataFrame or DataArray
2D Connectivity matrix of shape (n_rows, n_cols). If conn is a DataFrame or a DataArray, the indexes and columns are used for the conn and y tick labels
- nodes_datapd.DataFrame
DataFrame that can contains nodes informations (e.g the name of the nodes, the x, y and z coordinates, values assign to the nodes etc.)
- categoriesdict, str | None
Nodes categories. If a dict is passed, the keys should corresponds to the name of the nodes and the values to the category name. Alternatively, if nodes_data is provided, a string referring to a column name can be provided instead
- nodes_namelist, array_like, str | None
List of names of the nodes. Alternatively, if nodes_data is provided, a string referring to a column name can be provided instead
- nodes_color, nodes_sizelist, array_like, str | None
List of values assign to each node in order to modulate respectively the color and the size of the nodes. If None, the degree of each node is going to be used instead. Alternatively, if nodes_data is provided, a string referring to a column name can be provided instead
- nodes_size_min, nodes_size_maxfloat | 1, 30
Respectively, the minimum and maximum size to use for the markers
- nodes_cmapstr | ‘plasma’
Colormap to use in order to infer the color of each node
- nodes_textdict | None
Text to display at each node. It should be a dict where the keys are the nodes names and the values the text to display
- nodes_text_offsetfloat | 1.
Floating point indicating the offset to apply to the name of each node
- nodes_text_sizefloat | 12
Font size for the nodes names
- edges_min, edges_maxfloat | None
Respectively the minimum and maximum to use for clipping edges values
- edges_width_min, edges_width_maxfloat | .5, .8
Respectively the minimum and maximum width to use fot the edges
- edges_opacity_min, edges_opacity_maxfloat | 0.1, 1.
Respectively the minimum and maximum opacity for edges
- edges_cmapstr | ‘plasma’
Colormap to use to infer the color of each edge
- cbarbool | True
Add a colorbar to the plot.
- cbar_titlestr | ‘Edges
Default colorbar title
- directedbool | False
Specify if the graph is undirected (False) or directed (True)
- angle_startfloat | 90
The angle (in degree) at which to start setting nodes names
- angle_rangefloat | 360
Angle range coverered (in degree). For example, if 180 is given, half of the circle is going to be displayed
- figgo.Figure | None
plotly.graph_objects.Figure object
- kw_tracedict | {}
Additional arguments to pass to the plotly.graph_objects.Figure.add_trace method
- Returns
- figgo.Figure | None
A plotly.graph_objects.Figure object