Skip to content

Commit

Permalink
added edge_lw parameter to drawing functions
Browse files Browse the repository at this point in the history
  • Loading branch information
maximelucas committed Feb 5, 2025
1 parent f139fe5 commit b94e1ab
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion xgi/drawing/draw.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def draw(
edge_vmin=None,
edge_vmax=None,
edge_ec=None,
edge_lw=0,
alpha=0.4,
hull=False,
radius=0.05,
Expand Down Expand Up @@ -188,6 +189,9 @@ def draw(
If None (default), color by edge size.
Numerical formats will be mapped to colors using edge_vmin, edge_vmax,
and edge_fc_cmap.
edge_lw : float, optional
Linewidth of the edge of hyperedges. By default, 0 (no edge).
Ignored and set to 0 if S is a SimplicialComplex.
alpha : float, optional
The edge transparency. By default, 0.4.
hull : bool, optional
Expand Down Expand Up @@ -311,6 +315,7 @@ def draw(
edge_vmin=edge_vmin,
edge_vmax=edge_vmax,
edge_ec=edge_ec,
edge_lw=edge_lw,
max_order=max_order,
hyperedge_labels=hyperedge_labels,
hull=hull,
Expand Down Expand Up @@ -551,6 +556,7 @@ def draw_hyperedges(
edge_vmin=None,
edge_vmax=None,
edge_ec=None,
edge_lw=0,
alpha=0.4,
max_order=None,
params=dict(),
Expand Down Expand Up @@ -612,7 +618,7 @@ def draw_hyperedges(
edge_vmin, edge_vmax : float, optional
Minimum and maximum for edge colormap scaling. By default, None.
edge_ec : color or list of colors or array-like or dict or EdgeStat, optional
Color of the hyperedges. The accepted formats are the same as
Color of the edge of the hyperedges. The accepted formats are the same as
matplotlib's scatter, with the addition of dict and IDStat.
Formats with colors:
Expand All @@ -630,6 +636,8 @@ def draw_hyperedges(
If None (default), color by edge size.
Numerical formats will be mapped to colors using edge_vmin, edge_vmax,
and edge_fc_cmap.
edge_lw : float, optional
Linewidth of the edge of hyperedges. By default, 0 (no edge).
alpha : float, optional
The edge transparency. By default, 0.4.
max_order : int, optional
Expand Down Expand Up @@ -806,6 +814,7 @@ def draw_hyperedges(
edgecolors=edge_ec,
alpha=alpha,
zorder=max_order - 2, # below dyads
linewidth=edge_lw,
)
# edge_collection.set_cmap(edge_fc_cmap)
if edge_c_to_map:
Expand Down Expand Up @@ -984,6 +993,7 @@ def draw_simplices(
edge_fc_cmap=edge_fc_cmap,
edge_vmin=edge_vmin,
edge_vmax=edge_vmax,
edge_lw=0,
alpha=alpha,
max_order=max_order,
params=params,
Expand Down

0 comments on commit b94e1ab

Please sign in to comment.