Plotting
- driada.recurrence.plotting.plot_recurrence(rg, ax=None, markersize=0.5, color='black', **kwargs)[source]
Plot a recurrence matrix as a spy plot.
Uses matplotlib’s spy() for efficient rendering of sparse binary matrices.
- Parameters:
rg (RecurrenceGraph or Network) – Object with
.adjsparse adjacency matrix.ax (matplotlib.axes.Axes, optional) – Axis to plot on. If None, creates new figure.
markersize (float, default=0.5) – Size of recurrence dots.
color (str, default='black') – Color of recurrence dots.
**kwargs – Additional keyword arguments passed to
ax.spy().
- Returns:
fig (matplotlib.figure.Figure or None) – Figure (None if ax was provided).
ax (matplotlib.axes.Axes) – Axes with the plot.