Algorithmically finding a visually pleasing graph layout is hard. This is demonstrated by the plethora of different algorithms in use (if graph layout

paulbrodersen / netgraph

submited by
Style Pass
2021-06-08 16:30:08

Algorithmically finding a visually pleasing graph layout is hard. This is demonstrated by the plethora of different algorithms in use (if graph layout was a solved problem, there would only be one algorithm). To ameliorate this problem, this module contains an InteractiveGraph class, which allows node positions to be tweaked with the mouse after an initial draw.

The class InteractiveGraph also facilitates interactive data exploration. When hovering over a node, the node and all its neighbours in the graph are highlighted. When hovering over an edge, the edge and its source and target nodes are highlighted.

Apart from the labels, additional annotations can be passed in via the node_data and edge_data keyword arguments. The visibility of these annotations is toggled by clicking on the corresponding plot elements.

High quality figures require fine control over plot elements. To that end, all node artist and edge artist properties can be specified in three ways:

Leave a Comment
Related Posts