ragraph.plot
¶
RaGraph plotting module¶
Style
¶
|
Bases: Mapping
RaGraph plot style mapping.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
convention
|
Optional[Convention]
|
Convention to use when drawing edges. |
None
|
boxsize
|
Optional[int]
|
Size in pixels per row or column. |
None
|
config
|
Optional[Dict[str, Any]]
|
Plotly Figure.show() config. |
None
|
highlight_annotation
|
Optional[str]
|
Annotation key of instances that should be highlighted.
Value should be True-ish. Set key to |
None
|
highlight_color
|
Optional[str]
|
Default color to use for highlights. |
None
|
labels
|
Optional[Union[LabelsStyle, Dict[str, Any]]]
|
Labels plot style. |
None
|
layout
|
Optional[Union[Layout, Dict[str, Any]]]
|
Layout options. |
None
|
palettes
|
Optional[Palettes]
|
Plot palettes options. |
None
|
piemap
|
Optional[Union[PieMapStyle, Dict[str, Any]]]
|
Piechart map plot style. |
None
|
tree
|
Optional[Union[TreeStyle, Dict[str, Any]]]
|
Tree plot style. |
None
|
legend
|
Optional[Union[LegendStyle, Dict[str, Any]]]
|
Legend plot style. |
None
|
show_legend
|
Optional[bool]
|
Bool to display legend. |
None
|
chord
|
Optional[Union[ChordStyle, Dict[str, Any]]]
|
Chord plot style. |
None
|
row_col_numbers
|
Optional[bool]
|
Bool to display row and column numbers. |
None
|
xstep
|
Optional[str]
|
Axis increment per row or column in plots (usually 1). |
None
|
ystep
|
Optional[str]
|
Axis increment per row or column in plots (usually 1). |
None
|
Source code in ragraph/plot/generic.py
boxsize
¶
chord
¶
|
config
¶
convention
¶
|
highlight_annotation
¶
Annotation key of instances that should be highlighted.
Value should be True-ish. Set key to None
to disable.
highlight_color
¶
labels
¶
|
layout
¶
legend
¶
|
palettes
¶
piemap
¶
|
row_col_numbers
¶
show_legend
¶
tree
¶
xstep
¶
chord
¶
Make a chord plot for the given nodes in a graph.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
graph
|
Graph
|
Graph to create a chord plot for. |
required |
nodes
|
Optional[Union[List[Node], List[str]]]
|
Nodes or node names to include in the chord plot. Defaults to leaf nodes. |
None
|
style
|
Optional[Style]
|
Plotting style. |
None
|
adj_kwargs
|
Optional[Dict[str, Any]]
|
Additional arguments to |
None
|
symmetrize
|
bool
|
Whether to symmetrize the adjacency matrix. |
False
|
show
|
bool
|
Whether to show the resulting figure. |
False
|
Returns:
Type | Description |
---|---|
Chord
|
Chord plot using openchord. |
Source code in ragraph/plot/components/chord.py
delta_dsm
¶
dmm
¶
|
Get a domain-mapping-matrix (DMM) plot of a Graph object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rows
|
List[Node]
|
The nodes to be placed on the rows of the matrix. |
required |
cols
|
List[Node]
|
The columns to be placed on the columns of the matrix. |
required |
edges
|
List[Edge]
|
Edges to be displayed between leaf nodes. |
required |
style
|
Style
|
Plot style option mapping. |
Style()
|
sort
|
bool
|
Boolean to indicate whether the rows and cols should be sorted following the hierarchical structure. |
True
|
row_node_kinds
|
Optional[List[str]]
|
The node kinds displayed on the rows. |
None
|
col_node_kinds
|
Optional[List[str]]
|
The node kinds displayed on the columns. |
None
|
show
|
bool
|
Boolean to display the figure. |
False
|
Returns:
Type | Description |
---|---|
Figure
|
Domain-mapping matrix figure. |
Source code in ragraph/plot/__init__.py
dsm
¶
Get a DSM plot of a Graph object.
Arguments leafs: The nodes to be placed on the rows and columns of the matrix.. edges: Edges to be displayed between leaf nodes. style: Plot style option mapping. sort: Boolean to indicate whether the rows and cols should be sorted following the hierarchical structure. node_kind: The node kind to be displayed. show: Boolean to display the figure.
Source code in ragraph/plot/__init__.py
mdm
¶
Get a Multi-Domain Matrix (MDM) plot of a Graph object.
Arguments leafs: The nodes to be placed on the rows and columns of the matrix.. edges: Edges to be displayed between leaf nodes. style: Plot style option mapping. sort: Boolean to indicate whether the rows and cols should be sorted following the hierarchical structure. node_kinds: The node kinds displayed within the matrix. show: Boolean to display the figure.