Zsailer / nx_altair

Draw interactive NetworkX graphs with Altair
MIT License
224 stars 26 forks source link

Edge Direction #8

Closed ryanpeach closed 6 years ago

ryanpeach commented 6 years ago

added to_pandas_edges_arrows to core.py which calculates portions of the line to be shown as arrows.

added draw_networkx_arrows to draw_altair.py which draws the arrows as rectangles on the lines. Added parameters:

Not dependent on my other pull request. Will require a merge to put them together, only conflict will be in draw_networkx due to the if statements.

Graphs look similar to a DiGraph in networkx base package plotting. Arrows are only appied if G isinstance nx.DiGraph.

ryanpeach commented 6 years ago

So 1 issue, the new lines appear on top of the points. Any way to fix that?

Also, any ideas on how to make the arrows 'prettyer'? I may add a color parameter. The variable lengths look kinda trippy too, might make that parameter default to like, .1 instead.

Zsailer commented 6 years ago

Great! Thank you for working on this. I've been meaning to add arrows.

Sorry for the slow-ish replies! I'm traveling right now with limited internet. I'll try to review this PR more closely in the next day or two.

Zsailer commented 6 years ago

This PR was auto-closed because it was merged in PR #10.