Repository navigation
Draw functions wraps display - #8255
Open
mjschwenne wants to merge 14 commits into
Open
mjschwenne wants to merge 14 commits into
mjschwenne wants to merge 14 commits into
Conversation
Member
|
Thanks @mjschwenne!! |
Peiffap
reviewed
Sep 8, 2025
Contributor
Wholeheartedly agree - thanks for all your contributions @mjschwenne ! And if you're ever looking for a way to procrastinate, say while authoring a thesis, NX will always be around 🙃 |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates the following functions to use
displayfor the actual drawing.draw_networkx_nodesdraw_networkx_edgesdraw_networkx_labelsdraw_networkx_edge_labelsThe goal here is to avoid having two implementations for all the drawing code but having all the
drawfunctions usedisplay. To accomplish this, I needed to add a series of compatibility keyword arguments to change things like the returned object and forcedisplayto always use fancy arrow patches.With regard to breaking changes, nearly everything should be internal to the functions except that from
draw_networkx_edges, two attributes (edge width and edge color) may now return arrays with one more dimension then before, i.e.[3, 3, 3]instead of3. I'm not sure what caused the change, but since attributes are individualized now I tried to pass a scalar if possible but it didn't change how the widths and colors were reported. Looking at the changes in the test file should provide a more concrete example of this change.Unfortunately, I think that my time as a networkx maintainer is at its end. My graduate studies are currently preventing me from being able to spend any time on networkx, even attending the developer meetings, and will be for a long time. I will try to be available for bug fixes on the code that I've contributed, but it's hard to make any guarantees.
I've learned a lot about open source software, and how to use and manage large source code repositories from working with networkx and the excellent team of maintainers on the project.