Skip to content

Commit

Permalink
clean: removed unused cmap argument
Browse files Browse the repository at this point in the history
  • Loading branch information
maximelucas committed Oct 17, 2023
1 parent 31b0fc8 commit b14fd9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 3 additions & 5 deletions xgi/drawing/draw.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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):
Expand Down
4 changes: 1 addition & 3 deletions xgi/drawing/draw_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down

0 comments on commit b14fd9e

Please sign in to comment.