hatvis.layout#
Vertex layouts for node-link hypergraph drawings.
layout_similarity()— the HAT-VIS layout (Czvetkó and Abonyi 2024): vertex similarity, transitive closure, classical multidimensional scaling (or Sammon mapping); positions carry meaning, close vertices are similar;layout_force()— the force-directed layout of HyperGodot (Ficsor et al. 2025): springs between every vertex and the centroid of each of its hyperedges, inverse-square repulsion between all vertices;layout_membership()— a new membership-aware layout of this package: stress majorization towards the similarity distances, interleaved with a projection step that pushes non-member vertices out of the disc of every hyperedge, so that hulls contain fewer foreign vertices;circular, grid, radial (breadth-first from the most central vertex), spectral and bipartite (star-expansion spring) layouts.
All functions return dict label -> numpy.ndarray([x, y]) scaled to the
unit box \([0,1]^2\) (aspect ratio kept).
Similarity (HAT-VIS), force-directed (HyperGodot), membership-aware, circular, radial, spectral and bipartite layouts; layout quality.
Functions#
|
Classical (Torgerson) multidimensional scaling. |
|
Sammon mapping (Sammon 1969) of a dissimilarity matrix. |
|
Similarity-preserving layout (HAT-VIS). |
|
Force-directed layout of HyperGodot (Ficsor et al. 2025). |
|
Membership-aware layout (new in hatvis). |
|
Vertices evenly on a circle; |
|
Vertices on a square grid (row-major, in vertex order or the given order). |
|
Radial layout: the most central vertex (largest degree) in the middle, the others on rings by graph distance. |
|
Coordinates from the two leading non-trivial Laplacian eigenvectors (Zhou et al. 2006). |
|
Spring layout of the star expansion; hyperedges act as hidden attractor nodes. |
|
Centroid of the member positions of every non-empty hyperedge. |
|
Quality of a layout for hypergraph drawing. |
|
Scale coordinates to the unit box (keeping the aspect ratio) and return a label dict. |