报错:ValueError: Using a string of single character colors as a color sequence is not supported.
python可视化画不同颜色柱状图——使用matplotlib绘制简单图形bar的颜色选择问题:运行报错:ValueError: Using a string of single character colors as a color sequence is not supported,......查了后,可以将颜色分开一个一个写出来,就好了,修改如下:'plt.bar(range(len(num_list)), num_list, color=['r','b','g','y'])。
原创
2022-05-23 17:36:50 ·
3508 阅读 ·
0 评论