ragraph.plot.utils
#
RaGraph plot utilities.
Module Contents#
Functions#
|
Get a subplots |
|
Show figure with config if |
|
Get grid layout for mdm figure. |
|
Get grid layout for mdm figure. |
|
Swatch plot of colormaps. |
- ragraph.plot.utils.get_subplots(components: List[List[Optional[ragraph.plot.generic.Component]]], style=Style()) plotly.graph_objects.Figure #
Get a subplots
plotly.graph_objects.Figure
the given- Parameters:
components – Components to be laid out as subplots based on their width and height properties.
:keyword Passed on to
plotly.subplots.make_subplots
.:
- ragraph.plot.utils.process_fig(fig: plotly.graph_objects.Figure, style: ragraph.plot.generic.Style = Style(), show: bool = True) Optional[plotly.graph_objects.Figure] #
Show figure with config if
show
is set, otherwise return figure unchanged.- Parameters:
fig – Plotly figure.
style – Style containing additional config.
show – Whether to show the figure inline.
- ragraph.plot.utils.get_mdm_grid(leafs: List[ragraph.node.Node], edges: List[ragraph.edge.Edge], style: ragraph.plot.generic.Style = Style()) List[List[Optional[ragraph.plot.generic.Component]]] #
Get grid layout for mdm figure.
- Arguments
leafs: List of nodes to be displayed. edges: The edges to be displayed. style: Plot style option mapping.
- Returns
Grid of go.Figure objects.
- ragraph.plot.utils.get_dmm_grid(rows: List[ragraph.node.Node], cols: List[ragraph.node.Node], edges: List[ragraph.edge.Edge], style: ragraph.plot.generic.Style = Style()) List[List[Union[plotly.graph_objects.Figure, None]]] #
Get grid layout for mdm figure.
- Arguments
rows: The nodes to be placed on the rows of the matrix. cols: The columns to be placed on the columns of the matrix. edges: The edges to be displayed. style: Plot style option mapping.
- Returns
Grid of go.Figure objects.
- ragraph.plot.utils.get_swatchplot(*args, **kwargs: Dict[str, List[str]]) plotly.graph_objects.Figure #
Swatch plot of colormaps.
- Parameters:
lists. (Hex coded color) –
- Keyword Arguments:
lists. (Names to hex coded color) –
- Returns:
Plotly figure.