pygraphistry
pygraphistry copied to clipboard
[FEA] tree layouts should support a planar layout mode
Is your feature request related to a problem? Please describe.
When plotting tree data, edges sometimes intersect. Ex:
g = (g
.get_degrees()
.tree_layout(
level_sort_values_by='degree',
level_sort_values_by_ascending=False,
level_align='center',
vertical=True,
ascending=True)
.settings(url_params={'bg': '%23' + '000000', 'edgeCurvature': 0.05,'edgeInfluence': 1.5,'pointSize' : 0.5})
.layout_settings(play=0, locked_x=True)
)
return g.plot(render = False,memoize = False)
On planar graphs (ex: trees), this should be avoidable
Describe the solution you'd like
The default should be something like sort-by-parent-position (level_sort_mode='parent'?), which can be used if level_sort_values_by is not set
Describe alternatives you've considered
- radial versions of the same
- implement / embed reingold tilford (tidier) (ex: https://hci.stanford.edu/courses/cs448b/f09/lectures/CS448B-20091021-GraphsAndTrees.pdf)