pygraphistry
pygraphistry copied to clipboard
[FEA] Radial and linear hierarchical layouts
trafficstars
From discussions with @sevickson :
The radial and linear layout modes are helpful for API usage, so we should make it easy for pygraphistry/api users to make them!
This comes down to a few things, and can be done in stages:
Components
PyGraphistry layout: mapping a graph -> linear/radial coordinates + axis object
Input:
- g: nodes/edges df with src/dst/node bindings
- `orientation :: linear | radial
?sort_key :: straxis :: [ { label : str, ?key_val: any, ?sort: [ { ?key: str, ascending: bool } ], color : str | int, ?thickness: int, ?width : int, stroke : solid | dotted | ..., ?spacing : int } ]
Output:
- g.nodes set with x/y
- axis objects list
PyGraphistry hooks for specifying the layout
- Graph: g.layout(g.layout_radial(...))
, whereg.layout_radialinternally is justg * ... -> g - Hypergraph: ???
.plot(): Uses complexEncodings API to pass along the axis?
Rollout
-
Phase 1: Run the layout locally via PyGraphistry <-- community-contributable for the layout alg part, and we should carry the water for plugging into pygraphistry and the complex encodings api
-
Phase 2: Support for all API users and on bigger scale via mirroring on the backend
-
Phase 3: ... with post-load in-UI editing