hatvis.plotting.draw_hypergraph#

hatvis.plotting.draw_hypergraph(H, pos=None, *, layout='similarity', style='hull', ax=None, node_color=None, node_size=None, size_by='degree', edge_color=None, edge_width=None, width_by='weight', group=None, group_styles=None, fill=True, alpha=0.13, pad=0.03, pad_step=0.45, labels=True, label_size=9, edge_labels=False, legend=None, edges=None, highlight=None, random_state=0, title=None)[source]#

Draw a hypergraph as vertices with hyperedge outlines.

Parameters:
HHypergraph
posdict, optional

Vertex positions; otherwise the named layout is computed ("similarity" = HAT-VIS, "force" = HyperGodot, "membership", "circular", "spectral", "radial", "bipartite", "grid").

stylestr

"hull" – padded convex hulls with concentric padding per vertex (HyperGodot); "smooth" – the same with rounded corners; "bubble" – implicit isocontours that avoid non-members; "ellipse" – minimum-volume enclosing ellipses; "polygon" – filled convex polygons of the members (no padding); "star" – spokes from a hyperedge hub (the extra-node / star-expansion drawing); "mst" – minimum spanning tree of the members.

node_color, node_size, size_byvertex colors (value, mapping, Series or a

node_data column) and sizes (size_by="degree" scales with the degree).

edge_color, edge_width, width_byhyperedge colors (None: palette, or an

edge_data column for categorical colors) and line widths (width_by="weight" or a Series such as a centrality).

groupstr, optional

edge_data column whose values select the line style (solid, dashed, …), the comparative view of HyperGodot.

edgeslist, optional

Draw only these hyperedges (vertices are all drawn).

highlightvertex label, optional

Draw only the hyperedges that contain this vertex in color, the others in light gray (the vertex filter of HyperGodot / ego view of HAT-VIS).

Examples using hatvis.plotting.draw_hypergraph#

A first hypergraph: incidence matrix, dual and degrees

A first hypergraph: incidence matrix, dual and degrees

What the clique expansion forgets

What the clique expansion forgets

Six layouts of the same hypergraph

Six layouts of the same hypergraph

Seven ways to draw a hyperedge

Seven ways to draw a hyperedge

Comparing groups: human and machine work

Comparing groups: human and machine work

Membership-aware layout: similarity with fewer intrusions

Membership-aware layout: similarity with fewer intrusions

Frequent itemsets as a hypergraph

Frequent itemsets as a hypergraph

Covering and hitting: minimal monitoring sets

Covering and hitting: minimal monitoring sets

Acyclic hypergraphs and join trees

Acyclic hypergraphs and join trees

Comparing two versions of a production system

Comparing two versions of a production system