dirconn.viz.chord_diagram#

dirconn.viz.chord_diagram(conn: Connectivity, groups: Mapping[str, str], *, measure: str = 'values', how: str = 'mean', freq: float | None = None, band: str | Sequence[float] | None = None, time: float | None = None, figsize: tuple[float, float] = (6.0, 6.0), cmap: Any = 'tab10', ax: Any = None) → Any#

Draw the connectivity between groups of nodes as a directed chord diagram (pyCirclize).

The values are summarised by group_matrix() (within-group entries are left out) and drawn with directed links, a ribbon from the source group to the target group as wide as the value.

Parameters:
  • conn – As in group_matrix().

  • groups – As in group_matrix().

  • how – As in group_matrix().

  • freq – As in group_matrix().

  • band – As in group_matrix().

  • time – As in group_matrix().

  • measure ({"values", "net_direction"}) – "values" draws the summarised values (they must be non-negative); "net_direction" draws, for every pair of groups, only the stronger direction, with the width of the difference. That figure shows sources and sinks and carries GUARD_CAPTION.

  • figsize (tuple of float) – Size of the figure (ignored with ax).

  • cmap (str or dict) – Colours of the groups, as in pyCirclize.

  • ax (matplotlib polar axes, optional) – Axes to draw on.

Return type:

matplotlib.figure.Figure