Skip to content

Commit 2244dda

Browse files
committed
Fix cmap in nx.draw used without node_colors
1 parent ee3b582 commit 2244dda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graph_coloring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def build_graph(num_nodes):
3030

3131
G = nx.powerlaw_cluster_graph(num_nodes, 3, 0.4)
3232
pos = nx.spring_layout(G)
33-
nx.draw(G, pos=pos, node_size=50, edgecolors='k', cmap='hsv')
33+
nx.draw(G, pos=pos, node_size=50, edgecolors='k')
3434
plt.savefig("original_graph.png")
3535

3636
return G, pos

0 commit comments

Comments
 (0)