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

Add the ability to draw hypergraphs as a bipartite graph #492

Merged
merged 45 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
97013fe
add bipartite layout
nwlandry Oct 18, 2023
b41067f
Update draw.py
nwlandry Oct 18, 2023
8614660
update
nwlandry Nov 3, 2023
f4d6760
remove unused imports
nwlandry Nov 3, 2023
d660bc4
updates
nwlandry Jan 14, 2024
925c022
fix import error
nwlandry Feb 12, 2024
5d053b3
update with reduced functionality
nwlandry Feb 12, 2024
0185f2b
Update draw.py
nwlandry Feb 12, 2024
4f82531
fix unit tests and functionality
nwlandry Feb 13, 2024
c5dec10
removed unnecessary imports
nwlandry Feb 13, 2024
c21fe77
removed references to old drawing function
nwlandry Feb 13, 2024
6f64151
formatting
nwlandry Feb 13, 2024
557b82f
add instructions
nwlandry Feb 13, 2024
5096a79
Update HOW_TO_CONTRIBUTE.md
nwlandry Feb 13, 2024
2e34fb3
Update developer.txt
nwlandry Feb 13, 2024
41efd3e
Fix messy notebook diffs. Merge branch 'main' into add-draw-bipartite
nwlandry Feb 13, 2024
d5adfa7
add tests
nwlandry Feb 26, 2024
48e27f4
fix api and documentation
nwlandry Feb 26, 2024
98088fd
Merge branch 'main' into add-draw-bipartite
nwlandry Feb 26, 2024
a069b11
updated changelog and upversion
nwlandry Feb 29, 2024
7848f52
Revert "updated changelog and upversion"
nwlandry Feb 29, 2024
8548006
updates
nwlandry Mar 2, 2024
e931e8b
response to review
nwlandry Mar 2, 2024
66994ce
updated kernel
nwlandry Mar 8, 2024
249c371
Update Tutorial 7 - Directed Hypergraphs.ipynb
nwlandry Mar 8, 2024
08f6c06
updates
nwlandry Mar 8, 2024
7934570
Update docs
nwlandry Mar 8, 2024
9325619
Fix failing tests
nwlandry Mar 8, 2024
88c01b2
Merge branch 'main' into add-draw-bipartite
nwlandry Mar 8, 2024
105fd9b
Removed bad looking drawings
nwlandry Mar 8, 2024
950427a
added unit tests and updated code to match
nwlandry Mar 8, 2024
253e844
fixed a bug
nwlandry Mar 8, 2024
1307d55
response to review
nwlandry Mar 11, 2024
bf092f3
Added explanatory comment
nwlandry Apr 2, 2024
a2b90ae
Update xgi/drawing/draw.py
nwlandry Apr 17, 2024
7e2970b
Update xgi/drawing/draw.py
nwlandry Apr 18, 2024
9f2c6eb
Update xgi/drawing/draw.py
nwlandry Apr 18, 2024
d7c4554
Response to review
nwlandry Apr 18, 2024
acd7071
Remove broken conventional commits link
nwlandry Apr 18, 2024
6ffce2f
Update Tutorial 5 - Plotting.ipynb
nwlandry Apr 18, 2024
330f865
added and fixed tests
nwlandry Apr 18, 2024
c42a946
added documentation
nwlandry Apr 18, 2024
909489d
Fixed colormap
nwlandry Apr 22, 2024
362a591
fixed edge color issue.
nwlandry Apr 22, 2024
730bd74
Merge branch 'main' into add-draw-bipartite
nwlandry Apr 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions tests/drawing/test_draw_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
from matplotlib import cm

import xgi
from xgi.drawing.draw import (
_CCW_sort,
_draw_arg_to_arr,
_interp_draw_arg,
)
from xgi.drawing.draw import _CCW_sort, _draw_arg_to_arr, _interp_draw_arg


def test_CCW_sort():
Expand Down
1 change: 0 additions & 1 deletion xgi/drawing/draw.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sb # for cmap "crest"
nwlandry marked this conversation as resolved.
Show resolved Hide resolved
from matplotlib import cm
from matplotlib.patches import FancyArrowPatch
from mpl_toolkits.mplot3d.art3d import (
Expand Down
13 changes: 2 additions & 11 deletions xgi/drawing/draw_utils.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
"""Draw hypergraphs and simplicial complexes with matplotlib."""

from collections.abc import Iterable

import matplotlib.pyplot as plt
import numpy as np
from matplotlib.colors import (
LinearSegmentedColormap,
ListedColormap,
is_color_like,
to_rgba_array,
)
from numpy import ndarray

from ..exception import XGIError
from matplotlib.colors import is_color_like, to_rgba_array

from ..stats import EdgeStat, IDStat, NodeStat
from .layout import barycenter_spring_layout

Expand Down
Loading