xgi-org / xgi

CompleX Group Interactions (XGI) is a Python package for higher-order networks.
https://xgi.readthedocs.io
Other
180 stars 28 forks source link

Drawing hull as an option in draw_hyperedges #491

Closed maximelucas closed 11 months ago

maximelucas commented 11 months ago

draw_hypergraph_hull was last function to make consistent #477. I noticed the edge-plotting part was doing exactly the same as draw_hyperedges except for the few lines drawing the hulls. So I:

This closes #477 and #388. Related to #404.

review-notebook-app[bot] commented 11 months ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

codecov[bot] commented 11 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (de8a39c) 91.89% compared to head (1150648) 92.04%. Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #491 +/- ## ========================================== + Coverage 91.89% 92.04% +0.14% ========================================== Files 60 60 Lines 4441 4372 -69 ========================================== - Hits 4081 4024 -57 + Misses 360 348 -12 ``` | [Files](https://app.codecov.io/gh/xgi-org/xgi/pull/491?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xgi-org) | Coverage Δ | | |---|---|---| | [xgi/drawing/draw.py](https://app.codecov.io/gh/xgi-org/xgi/pull/491?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xgi-org#diff-eGdpL2RyYXdpbmcvZHJhdy5weQ==) | `76.59% <100.00%> (-0.32%)` | :arrow_down: | | [xgi/drawing/draw\_utils.py](https://app.codecov.io/gh/xgi-org/xgi/pull/491?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xgi-org#diff-eGdpL2RyYXdpbmcvZHJhd191dGlscy5weQ==) | `92.85% <ø> (+1.94%)` | :arrow_up: | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/xgi-org/xgi/pull/491/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xgi-org)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

maximelucas commented 11 months ago

Good ideas Thomas! Should be all good now.

For 3) I added a note in the docstrings. At first I thought we could just do the following to change it automatically like you said

if node_labels and node_size is None:
    node_size = 15

but by default node_size = 7 not None in the function call. So if we want to do it like this in another PR we would maybe need to set it to None and do inside of the function if node_size is None: node_size = 7...