Skip to content

Add iplotx to network drawing documentation - #8289

Merged
rossbar merged 5 commits into
networkx:mainfrom
iosonofabio:iplotx
Sep 26, 2025
Merged

rossbar merged 5 commits into
networkx:mainfrom
iosonofabio:iplotx

Conversation

@iosonofabio

Copy link
Copy Markdown
Contributor

After previous communication with @dschult and @tacaswell , the iplotx library (https://iplotx.readthedocs.org) was recently developed (by myself) to offer seamless network visualisation from both NetworkX and igraph:

  • working with native data structures, with no need for file export/import
  • expanding the range of styling options compared to internal NetworkX functions
  • using well behaved matplotlib artists that can be animated or edited after the fact
  • ensuring correct behaviour across backends, DPI resolutions, zoom/pan operations

This draft PR proposes to add specific mentions and examples of iplotx into NetworkX's documentation to let users know that option for network visualisation is available.

For starters, I added a mention in the drawing reference docs and an example in the "external" subgallery.

It would be great if one of you guys could take a quick look and share your thought on this. The iplotx API is slowly crystallising but currently still fluid enough that adjustments can be made to simplify life for end users.

After an initial round of feedback on the concept, I'm happy to fix CI issues, polish details, etc. etc. to meet your usual standards for PR acceptance.

THANK YOU!

@dschult dschult left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @iosonofabio!

Very happy to see this progress!

I've got a suggestion note below to handle the styling, and I restarted the documentation CI because it says it was canceled rather than actually getting an error. I don't see any issues with this submission. iplotx is a good chance to build a community around networkx visualization using multiple python network tools. igraph and networkx are a good start!

I notice in this PR (and before but I'll bring it up here). We typically use the terms node and edge rather than vertex or link. I see that you have parameters like vertex_size. Our users would probably not care much, but might have less cognitive load if that was node_size. One advantage of node over vertex is that there is one clear way to spell its plural form (vertexes and vertices are both accepted spellings). It's also 4 chars and one syllable. I understand completely that this may not be easy to join across libraries. Have you thought at all about how to merge terms and/or language surrounding different network libraries? It'd be cool to hear your thoughts.

:)

Comment thread doc/reference/drawing.rst Resolved
@iosonofabio

Copy link
Copy Markdown
Contributor Author

Thank you for the feedback.

I just released iplotx 0.7.0 which implements "node" as a peer of "vertex" for all style specifications. Internally, we still use "vertex" for simplicity (gotta keep my igraph friends happy too!) but that is an internal implementation matter that is subject to change in the future.

https://github.com/fabilab/iplotx/releases/tag/0.7.0

I will update this PR perhaps tomorrow or so to reflect this and also fix the linting issues above.

@rossbar rossbar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this together @iosonofabio ! I agree with @dschult that this is a nice project and I'd be very much in favor of highlighting iplotx to raise user awareness.

I left a minor nit and share @dschult 's general comments re: node vs. vertices etc. but I'm +1 on adding this!

I'm not sure what exactly is going on with the docs CI... it doesn't seem related. I can run this branch locally and everything looks good.

Comment thread doc/reference/drawing.rst Resolved
@iosonofabio

Copy link
Copy Markdown
Contributor Author

Thank you for your feedback!

Ok, I've released a couple more version of iplotx to make the node <-> vertex equivalence more widespread across the user-facing API and documentation, e.g.:

https://iplotx.readthedocs.io/en/latest/api/complete_style_specification.html

In fact, in case of conflict, node_ options will override vertex_ options, which is what you want when the default style library uses vertex_ options. That way, node_ are guaranteed to come from the user, i.e. they should override a default internal style.

I've also used node_ style options in the example of this PR for consistency.

I've also accepted your style/lint suggestions and merged them into the branch (thanks GitHub!).

Apart from the docs CI which looks likely to be unrelated, I feel like this is going in the right direction. I imagine we could merge as is (perhaps after the CI thing is ironed out). An alternative would be for me to add say a handful more examples throughout the docs (e.g. in "drawing" rather than "external") to cover a few disparate cases, or a few more mentions in other parts of the documentation. I'd be happy either way: perhaps keeping it small and merge and then worry about the rest in a future PR?

@rossbar

rossbar commented Sep 25, 2025

Copy link
Copy Markdown
Contributor

I'd be happy either way: perhaps keeping it small and merge and then worry about the rest in a future PR?

This would be my vote!

Apart from the docs CI which looks likely to be unrelated

Agreed this is unrelated, it's just unfortunate timing - see #8292 . Apologies for the inconvenience!

@dschult dschult left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the test failures are not related.
I'm approving this -- we can work on adding a few other things later.

@rossbar rossbar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed - thanks for putting this together @iosonofabio !

@rossbar
rossbar marked this pull request as ready for review September 26, 2025 20:30
@rossbar
rossbar merged commit 0f0c1e8 into networkx:main Sep 26, 2025
@iosonofabio

Copy link
Copy Markdown
Contributor Author

Thank you for the help and review! I'm adding 3D now, if it works I might make a new PR with an additional example in the next month or two.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants