Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

plotting

plotting

Plotting functions for Adjacency matrices.

Methods:

NameDescription
plot_adjacencyCreate Heatmap of Adjacency Matrix.
plot_mdsPlot Multidimensional Scaling.

Methods

plot_adjacency

plot_adjacency(adj, limit = 3, axes = None, *args, **kwargs)

Create Heatmap of Adjacency Matrix.

Can pass in any sns.heatmap argument.

Parameters:

NameTypeDescriptionDefault
adjAdjacencyAdjacency object to plot.required
limitintNumber of heatmaps to plot if object contains multiple adjacencies (default: 3).3
axesMatplotlib axis handle.None

Returns:

TypeDescription
None

plot_mds

plot_mds(adj, *, n_components = 2, metric_mds = True, labels = None, labels_color = None, cmap = None, view = (30, 20), figsize = None, ax = None, n_jobs = -1, **kwargs)

Plot Multidimensional Scaling.

Parameters:

NameTypeDescriptionDefault
adjAdjacencyAdjacency object to plot (must be a distance matrix).required
n_componentsintNumber of dimensions to project (can be 2 or 3).2
metric_mdsboolPerform metric (True) or non-metric (False) dimensional scaling. Default True.True
labelslistCan override labels stored in Adjacency Class.None
labels_colorlistList of colors for labels.None
cmapColormap instance (default: plt.cm.hot_r).None
viewtupleView for 3-Dimensional plot. Default (30, 20).(30, 20)
figsizelistFigure size. Default [12, 8].None
axMatplotlib axis handle.None
n_jobsintNumber of parallel jobs.-1

Returns:

TypeDescription
None