graphclust.plotting#

Plotting helpers (matplotlib) with the color scheme used in the book.

Graph, partition, dendrogram, VAT, component-plane and quality-curve plots.

Functions#

plot_component_planes(positions, nodes[, ...])

Component planes: the map once per feature, nodes shaded by that feature of their codebook vector.

plot_decision_graph(rho, delta[, centers, ...])

Density peaks decision graph (local density against distance to a denser sample).

plot_dendrogram(Z, *[, ax, threshold, title])

SciPy dendrogram of a linkage matrix with an optional cut line.

plot_embedding(Y[, labels, ax, s, title])

Scatter plot of a 2-D embedding colored by labels (or by a continuous value).

plot_graph(positions, adjacency, *[, X, ...])

Draw a graph whose nodes have 2-D or 3-D positions; optional data cloud X in the background.

plot_partition(X, labels, *[, ax, s, title, ...])

Scatter plot of 2-D (or 3-D) data colored by cluster label (noise -1 in gray).

plot_quality_curves(curves, *[, k, ax, ...])

Plot several quality curves (e.g. trustworthiness against k) given as {name: values}.

plot_vat(image, *[, ax, title, cmap])

Show a (i)VAT image: dark diagonal blocks are clusters.

Constants#

PALETTE

Okabe--Ito colors (color-blind safe), the categorical palette of all figures.