hatvis.plotting#

Plotting functions of hatvis (matplotlib).

Every function takes ax=None (or axes/fig), returns the axes and never calls plt.show(). Categorical colors follow the Okabe–Ito palette PALETTE.

Node-link drawings, matrix views (incidence, PAOH, UpSet, house of quality) and analysis plots.

Functions#

color_cycle(n)

n distinct colors: the Okabe–Ito palette first, then tab20 hues.

draw_hypergraph(H[, pos, layout, style, ax, ...])

Draw a hypergraph as vertices with hyperedge outlines.

draw_hatvis(H[, pos, ax, measure, ...])

The HAT-VIS drawing (Czvetkó and Abonyi 2024).

draw_bipartite(H[, pos, ax, layout, ...])

Star-expansion (bipartite, extra-node) drawing: vertices as circles, hyperedges as squares.

draw_clique(H[, pos, ax, weighting, layout, ...])

Clique expansion drawn as a weighted graph (line width ~ pair weight).

draw_line_graph(H[, s, ax, pos, edge_color, ...])

The \(s\)-line graph: hyperedges as nodes (size ~ \(|e|\)), links width ~ \(|e\cap f|\).

draw_circular(H, *[, ax, order, edge_color, ...])

Circular drawing: vertices on a circle, every hyperedge as a hub with curved spokes.

draw_primal_dual(H[, axes, layout, style, ...])

Linked primal and dual views (after Qu, Zhang and Zhang 2022).

resolve_layout(H[, pos, layout, random_state])

Return pos if given, otherwise compute the named layout.

plot_incidence(H[, order, ax, weighted, ...])

Incidence matrix as a heat map, optionally seriated and with highlighted biclusters.

plot_paoh(H, *[, ax, time, row_order, ...])

Parallel Aggregated Ordered Hypergraph (PAOH) view (Valdivia et al. 2021).

plot_upset(H[, by, max_bars, weighted, fig, ...])

UpSet plot (Lex et al. 2014) of a hypergraph.

plot_house_of_quality(relationship[, ...])

House of quality diagram: relationship matrix, importance column, technical importance row and roof.

plot_similarity_matrix(H, *[, ax, measure, ...])

Heat map of the vertex similarity matrix in a seriated order.

plot_distributions(H[, axes, log])

Degree and hyperedge-size distributions side by side.

plot_s_profile(H[, s_values, edges, ...])

The s-profile (new in hatvis): how every hyperedge behaves as the overlap threshold \(s\) grows.

plot_ranking(values[, top, ax, color, ...])

Horizontal bar chart of the largest values of a centrality (or any) Series.

plot_lattice(G[, ax, label, size_attr, ...])

Draw an inclusion lattice (Hasse diagram, hatvis.patterns.inclusion_lattice()) in levels by size.

plot_motif_profile(table[, column, ax, title])

Bar chart of motif significance (output of hatvis.motifs.motif_zscores()).

plot_activity(T[, ax, top, title])

Vertex activity over time: the number of hyperedges of each vertex per time stamp (heat map).

plot_s_walks(H[, s_values, axes, ...])

Side-by-side \(s\)-line graphs of the vertices for several \(s\) (cf.

convex_hull(points)

Convex hull vertices in counter-clockwise order (Andrew's monotone chain).

padded_hull(points, pad[, n_circle])

Convex hull of circles of radius pad around the points (HyperGodot style).

smooth_closed_curve(poly[, iterations])

Chaikin corner cutting of a closed polygon (rounded hull outlines).

polygon_area(poly)

Area of a simple polygon (shoelace formula).

min_volume_ellipse(points[, tol, max_iter])

Minimum-volume enclosing ellipse of a point set.

ellipse_points(A, c[, n, scale])

Boundary points (a closed curve) of the ellipse returned by min_volume_ellipse().

minimum_spanning_segments(points[, dissim])

Edges of the minimum spanning tree of a point set (Prim's algorithm).

isocontour(points[, others, sigma, level, ...])

Implicit outline of a point set (in the spirit of Bubble Sets, Collins et al. 2009).

Constants#

PALETTE

Built-in mutable sequence.

BRAND

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

GRAY

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

INK

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

LINESTYLES

Built-in mutable sequence.

MARKERS

Built-in mutable sequence.