diff --git a/xgi/drawing/draw.py b/xgi/drawing/draw.py index 8d944b48c..523156543 100644 --- a/xgi/drawing/draw.py +++ b/xgi/drawing/draw.py @@ -432,7 +432,7 @@ def draw_nodes( node_lw, settings["min_node_lw"], settings["max_node_lw"] ) - node_size = node_size**2 + node_size = np.array(node_size) ** 2 # plot node_collection = ax.scatter( @@ -593,10 +593,8 @@ def draw_hyperedges( dyad_lw = _draw_arg_to_arr(dyad_lw) # parse colors - dyad_color, dyad_c_mapped = _parse_color_arg( - dyad_color, dyad_color_cmap, list(dyads) - ) - edge_fc, edge_c_mapped = _parse_color_arg(edge_fc, edge_fc_cmap, list(edges)) + dyad_color, dyad_c_mapped = _parse_color_arg(dyad_color, list(dyads)) + edge_fc, edge_c_mapped = _parse_color_arg(edge_fc, list(edges)) # check validity of input values if np.any(dyad_lw < 0): diff --git a/xgi/drawing/draw_utils.py b/xgi/drawing/draw_utils.py index 7d7ee394e..d1c1d3062 100644 --- a/xgi/drawing/draw_utils.py +++ b/xgi/drawing/draw_utils.py @@ -84,7 +84,7 @@ def _update_lims(pos, ax): ax.autoscale_view() -def _parse_color_arg(colors, cmap, ids, id_kind="edges"): +def _parse_color_arg(colors, ids, id_kind="edges"): """ Parse and process color arguments for plotting. @@ -106,8 +106,6 @@ def _parse_color_arg(colors, cmap, ids, id_kind="edges"): * array of floats * dict of floats containing the `ids` as keys * IDStat containing the `ids` as keys - cmap : matplotlib colormap or None - The colormap to use for mapping numerical values to colors. ids : array-like or None The IDs of the elements being plotted. id_kind : str, optional