From 1b2c0422c4c4dfc91b5e8b73fc3f6e0b3519f7d0 Mon Sep 17 00:00:00 2001 From: Dustin Arendt Date: Fri, 24 Jan 2020 16:02:08 -0800 Subject: [PATCH] Bug fix for hyp-110: prevents edge labels from disappearing --- hypernetx/drawing/rubber_band.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hypernetx/drawing/rubber_band.py b/hypernetx/drawing/rubber_band.py index 2201736e..1e080c75 100644 --- a/hypernetx/drawing/rubber_band.py +++ b/hypernetx/drawing/rubber_band.py @@ -421,6 +421,9 @@ def draw(H, node_radius = {v: np.sqrt(a0*(len(v) if type(v) == frozenset else 1)/np.pi) for v in H.nodes} + # for convenience, we are using setdefault to mutate the argument + # however, we need to copy this to prevent side-effects + edges_kwargs = edges_kwargs.copy() edges_kwargs.setdefault('edgecolors', plt.cm.tab10(np.arange(len(H.edges))%10)) edges_kwargs.setdefault('facecolors', 'none')