Closed ryanpeach closed 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_*
@ryanpeach Thank you! This is great!
I'll test this out later this today, but looking at it quickly, it looks great!
We might be able to simplify this by using text as an encoding I just learned, but I think this gives us more control.
@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.
This PR was auto-closed because it was merged in PR #10.
I added
draw_networkx_nodes_labels
todraw_altair.py
with the following added parameters:node_label_size
: scalar or string Size of nodes (default=15). If an array is specified it must be the same length as nodelist.node_label_color
: color string, or array of floats Node color. Can be a single color format string (default='r'), or a sequence of colors with the same length as nodelist. If numeric values are specified they will be mapped to colors using the cmap and vmin,vmax parameters. See matplotlib.scatter for more details.node_label
: string The name of the node attribute to treat as a label.Limited testing shows that it works as expected, though I haven't yet tested color.