-
Notifications
You must be signed in to change notification settings - Fork 33
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
Drawing directed hypergraph #387
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
It looks pretty 😍 Is that what you had in mind @nwlandry ? Should we also add an option to draw the hyperedge (like a triangle for example) below it like in the other drawing functions? |
This should be easily done with the draw_hyperedges function but I'm afraid then it gets a bit ambiguous to have both the triangles and the squared markers representing the hyperedges |
This looks great, @thomasrobiglio!! My only suggestion would be to add a check that the input is indeed a directed hypergraph. |
Thanks so much!! 😎 |
Also why is one much lighter? Because it's a smaller hyperedge? |
Yes, if not specified the coloring is like the standard draw in which the color depends on the edge size |
Just noticed that edges of size 2 are treated as the other sizes so the function will still draw a square representing the edge... do we want to keep that or put simple arrows for edges of size 2? |
I actually prefer the square being there for dyads as well to emphasize the bipartite structure. Again, great work! |
Looking great! One thing - what do y'all think of an option to remove the squares? If all the lines are drawn up to the center of the square, then removing the squares will allow us to see the lines joining and forking again, which may be cool. Alternatively, an option to change the size of the squares independently of the size of the circles. |
Agreed with Leo. Also I don't see an option to add node/hyperedge labels, right? Could we add it like in the other viz functions? Also the triangle blue looks so pale by default, I'll raise an issue to see if we can improve the default coloring. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #387 +/- ##
==========================================
- Coverage 91.11% 91.02% -0.09%
==========================================
Files 46 46
Lines 3771 3834 +63
==========================================
+ Hits 3436 3490 +54
- Misses 335 344 +9
☔ View full report in Codecov by Sentry. |
Great work, @thomasrobiglio! |
As discussed in #375. See below for the drawing. Added a simple test, maybe I can add more. Modified the DiHypergraph tutorial showing a simple example of the drawing function.