Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create 3d_rotation_anime.py #7025

Merged
merged 30 commits into from Nov 5, 2023
Merged

Create 3d_rotation_anime.py #7025

merged 30 commits into from Nov 5, 2023

Conversation

lobpcg
Copy link
Contributor

@lobpcg lobpcg commented Oct 17, 2023

Make a new 3d example with rotating graph animation.

Motivated by @rossbar #6893 (comment)

@lobpcg
Copy link
Contributor Author

lobpcg commented Oct 17, 2023

@MridulS - I only need circleci but [skip test] has no effect?

@lobpcg lobpcg marked this pull request as draft October 17, 2023 18:43
@dschult
Copy link
Member

dschult commented Oct 22, 2023

Looks like in the documentation check deatils under "Build Doc" and then searching for "Animation", line 1375 or so in the Build Doc details identifies an error that the ====== lines aren't long enough around your title for the doc_string. But then it gives a number of warnings that suggest it is having trouble even loading networkx. I'm assuming it is a problem related to this test example -- perhaps the fact that it doesn't use networkx anywhere. But I can't really tell without trying to build locally.

Have you tried building the docs locally? Does the animation work there?

@lobpcg
Copy link
Contributor Author

lobpcg commented Oct 22, 2023

I can only run the code locally, but have no documentation building setup.

I'll look at the build messages, thanks for the advice!

@lobpcg lobpcg marked this pull request as ready for review October 23, 2023 15:59
@lobpcg lobpcg marked this pull request as draft October 23, 2023 22:08
@lobpcg
Copy link
Contributor Author

lobpcg commented Oct 25, 2023

Ready for review/merge, please

@lobpcg lobpcg marked this pull request as ready for review November 2, 2023 17:43
@lobpcg
Copy link
Contributor Author

lobpcg commented Nov 2, 2023

Copy link
Member

@dschult dschult left a comment

Choose a reason for hiding this comment

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

When first reading this I was thinking it was more about matplotlib than about networks. But by the end I could see the usefulness as an example of how to animate plots of a network (either rotating in 3D, or showing network attributes changing in time, etc).

Thanks a lot for getting this working. I am sure it will become a popular gallery example for NetworkX.

I've found a spelling error. I didn't search for others.
This PR looks good to me!

examples/3d_drawing/plot_3d_rotation_anime.py Outdated Show resolved Hide resolved
Copy link
Contributor

@rossbar rossbar left a comment

Choose a reason for hiding this comment

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

Thanks for iterating on this @lobpcg ! This LGTM; it might be good to split it up into multiple examples because sphinx-gallery only supports one plot for the thumbnail, but let's leave such touchups for follow-up PRs.

@rossbar rossbar merged commit 166cd70 into networkx:main Nov 5, 2023
35 checks passed
@jarrodmillman jarrodmillman added this to the 3.3 milestone Nov 5, 2023
@lobpcg lobpcg deleted the patch-2 branch November 5, 2023 01:20
cvanelteren pushed a commit to cvanelteren/networkx that referenced this pull request Apr 22, 2024
Add a gallery example demonstrating 3D animation for
graph visualization

Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: Ross Barnowski <rossbar@caltech.edu>
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.

None yet

4 participants