Skip to content

Commit

Permalink
Merge pull request #17 from dwave-examples/fix/userwarning-cmap
Browse files Browse the repository at this point in the history
Fix `cmap` in `nx.draw` used without `node_colors`
  • Loading branch information
randomir authored Jan 15, 2024
2 parents ee3b582 + 2244dda commit 95cd76d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion graph_coloring.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def build_graph(num_nodes):

G = nx.powerlaw_cluster_graph(num_nodes, 3, 0.4)
pos = nx.spring_layout(G)
nx.draw(G, pos=pos, node_size=50, edgecolors='k', cmap='hsv')
nx.draw(G, pos=pos, node_size=50, edgecolors='k')
plt.savefig("original_graph.png")

return G, pos
Expand Down

0 comments on commit 95cd76d

Please sign in to comment.