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

Embedded nodes in draw_multilayer #612

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

thomasrobiglio
Copy link
Collaborator

Adresses #436. I am still working on this to try to change as little as possible to behavior of the function.

@thomasrobiglio thomasrobiglio marked this pull request as draft October 28, 2024 15:01
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@maximelucas
Copy link
Collaborator

Quoting @thomasrobiglio :

Yes I thought the same about the nodes' shape. What can be more relevant is the following:

I am struggling to have a node collection returned when calling the function (which then allows to have the colorbars and the cool stuff we have for the standard drawing function).

This is because I need to create a separate Circle patch that is transformed into a 3D patch for each node (in each level) separately, and I have not managed to group these objects in a collection so far. I will keep looking for a solution, if you have ideas they are most welcome, I am a bit stuck--I have opened a draft pr #612

Yes, I thought that might be a problem. Matplotlib has different types of collections, including a PatchCollection with an example here. Would this work with the 3D patches?

@thomasrobiglio
Copy link
Collaborator Author

Thank you @maximelucas! this is more or less the documentation I was looking at when working on this... let's see if I can find something that works :).

@thomasrobiglio
Copy link
Collaborator Author

This could be a way out... to have the circles for the nodes drawn as polygons with many sides. It's not the best thing to do, but I could not find a way to use a collection of circle objects in 3d.

With a couple of tweaks, I should be able to make it work from outside as the function we have in the stable version now.

@maximelucas
Copy link
Collaborator

Could you show us what the viz would look like? Is it like your example in the issue you opened?

@thomasrobiglio
Copy link
Collaborator Author

Something like this---if you have more >20 points to build the polygon you cannot see that it's not an actual circle:

try

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants