-
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 hypergraphs with hyperdedges as convex hulls #320
Conversation
Convex hull drawing for hypergraphs.
created .ipynb tutorial and minor update to draw.py
docs
added edge_ec
modify doc
Update tutorial
hyperedges labelss
line 1180: zorder = max_order -1
allow controlling the zorder of the hulls
move convex_hull_drawing_example.ipynb to tutorials
minor update to tutorial
minor update to tutorial
line 1167 H.edges.members(dtype=dict) -> H._edge
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #320 +/- ##
==========================================
+ Coverage 86.39% 90.16% +3.76%
==========================================
Files 35 35
Lines 2757 2867 +110
==========================================
+ Hits 2382 2585 +203
+ Misses 375 282 -93
... and 3 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
One quick ask: can you delete the |
We could yea but I think the |
It seems like accepting negative values is separate from whether or not we want to square them for scale. I'd leave that for a different PR. |
Co-authored-by: Leo Torres <dleonardotn@gmail.com>
Thank you so much @thomasrobiglio ! I've approved but I'll let @maximelucas decide when to merge in case there's anything else to do here. |
Thanks Leo! For completeness, the last thing would be to add a simple test for Are you up for it @thomasrobiglio ? |
Note that I could not implement the test on the number of elements and on the zorder for the dyads because the drawing of the hulls generates 2D lines as well.
@maximelucas I have added the test. I could not implement also the test for the number of elements and zorder of the dyads because the drawing of the hulls also generated 2D lines (and the number of those is very initialisation dependent). For the moment I couldn't think of a solution to this. |
Thanks Thomas, good to go for me! |
Thanks so much @thomasrobiglio!! Looks awesome!! |
Congratulations @thomasrobiglio on your first merged PR. Hopefully first of many ;) |
Amazing, @thomasrobiglio! This is both what XGI deserves and what it needs right now. Thanks a lot |
I have defined a new function called
draw_hypergraph_hull
that allows for drawing hypergraphs with hyperdedges of order > 1 as convex hulls. This is done using theConvexHull
function fromscipy.spatial
. The drawing style is inspired from that of HyperNetX but implemented differently and coherently with the rest of xgi. I have also pushed a tutorial showing the different setting that can be passed to the function.