Skip to content

Commit

Permalink
Try to make edge_pos iteration deterministic
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanIsCoding committed Nov 11, 2024
1 parent badf425 commit 841b58d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rustworkx/visualization/matplotlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,9 +636,10 @@ def draw_edges(
edge_color = "k"

# set edge positions
edge_pos = set()
edge_pos_keys = dict()
for e in edge_list:
edge_pos.add((tuple(pos[e[0]]), tuple(pos[e[1]])))
edge_pos_keys[(tuple(pos[e[0]]), tuple(pos[e[1]]))] = None
edge_pos = edge_pos.keys()

# Check if edge_color is an array of floats and map to edge_cmap.
# This is the only case handled differently from matplotlib
Expand Down

0 comments on commit 841b58d

Please sign in to comment.