Zsailer / nx_altair

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

Node Labels #7

Closed ryanpeach closed 6 years ago

ryanpeach commented 6 years ago

I added draw_networkx_nodes_labels to draw_altair.py with the following added parameters:

Limited testing shows that it works as expected, though I haven't yet tested color.

ryanpeach commented 6 years ago

draw_networkx_edge_labels should be an exact copy, except that the x, y would be replaced by the midpoint of the line (however you calculate that).

That is why I made the parameters all titled node_label_* for the future addition of edge_label_*

Zsailer commented 6 years ago

@ryanpeach Thank you! This is great!

I'll test this out later this today, but looking at it quickly, it looks great!

ryanpeach commented 6 years ago

We might be able to simplify this by using text as an encoding I just learned, but I think this gives us more control.

Zsailer commented 6 years ago

@ryanpeach

This is great! Thank you for your work on this.

I submitted a review--mostly just renaming variables. I tested out the code and everything works great. If you have any questions, ping me here.

Zsailer commented 6 years ago

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