pygraphistry icon indicating copy to clipboard operation
pygraphistry copied to clipboard

[FEA] weight edges by same vs diff cluster nodes

Open lmeyerov opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe.

In the Marvel tutorial (.../simple/...), some somewhat tricky code does some nice spatial separation of clusters via edge weights:

  • identify each edge as between nodes of same/different cluster
  • set edge weight based on that identification

It'd be nice if that was a helper!

Describe the solution you'd like

g = g.weight_by_membership(
  key='cluster',
  member_weight=2.0,
  crossover_weight=1.0,
  edge_influence=0.5
)

Describe alternatives you've considered

  • option to color by cluster: that's really encode_point_color
  • skip setting edge_influence... better via None?

lmeyerov avatar May 01 '22 08:05 lmeyerov