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:
- H
Hypergraph - pos
dict,optional Vertex positions; otherwise the named
layoutis computed ("similarity"= HAT-VIS,"force"= HyperGodot,"membership","circular","spectral","radial","bipartite","grid").- style
str "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_by
vertexcolors(value,mapping,Seriesora node_datacolumn) and sizes (size_by="degree"scales with the degree).- edge_color, edge_width, width_by
hyperedgecolors(None:palette,oran edge_datacolumn for categorical colors) and line widths (width_by="weight"or a Series such as a centrality).- group
str,optional edge_datacolumn whose values select the line style (solid, dashed, …), the comparative view of HyperGodot.- edges
list,optional Draw only these hyperedges (vertices are all drawn).
- highlight
vertexlabel,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).
- H
Examples using hatvis.plotting.draw_hypergraph#
A first hypergraph: incidence matrix, dual and degrees
Membership-aware layout: similarity with fewer intrusions