doc: clarify allowed alpha when using nx.draw_networkx_edges#6254
doc: clarify allowed alpha when using nx.draw_networkx_edges#6254rossbar merged 2 commits intonetworkx:mainfrom
alpha when using nx.draw_networkx_edges#6254Conversation
This inconsistency between the docs and actual behaviour came up in two StackOverflow questions: https://stackoverflow.com/a/74106862/20148180 https://stackoverflow.com/q/74622898/10693596
dschult
left a comment
There was a problem hiding this comment.
This looks good. I checked that alpha does work for drawing edges with both LineCollection and FancyArrowPatch.
I also checked that an alpha list doesn't work for nx.draw_networkx_labels or nx.draw_networkx_edge_labels. That also makes it not work for nx.draw_networkx. It looks like it would be straightforward to add that functionality to the labels functions if anyone is interested. Or maybe there is now a TextCollection that we should be using for the node/edge labels. :} It's hard to keep up with matplotlib. :). If we stick with the current syntax, the labels code may work some day.
For now, this PR is helpful and corrects old information. I approve.
rossbar
left a comment
There was a problem hiding this comment.
Generally LGTM as well, minus one minor word/semantic nit!
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
rossbar
left a comment
There was a problem hiding this comment.
Thanks for this @SultanOrazbayev !
…rkx#6254) * doc: clarify allowed `alpha` when using nx.draw_networkx_edges Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
…rkx#6254) * doc: clarify allowed `alpha` when using nx.draw_networkx_edges Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
This inconsistency between the docs and actual behaviour came up in two StackOverflow questions:
https://stackoverflow.com/a/74106862/20148180
https://stackoverflow.com/q/74622898/10693596