- 老师答疑区
- 帖子详情
color设置多此一举
蒲江三哥
发表于2022年04月25日
<p><code class="brush:python;toolbar:false" >#画图
fig = plt.figure(facecolor='white')
plt.subplot(111,polar=True)
plt.plot(angles, scores, 'bo-', color= 'g', linewidth = 2)
plt.fill(angles, scores, facecolor = 'g',alpha=0.2)
plt.thetagrids(angles*180/np.pi,labels)
plt.title('成绩雷达图', ha='center')
plt.grid(True)
plt.show()</code></p><p>代码第三行,'bo-’,实际已经设定了颜色‘b’即蓝色,后面又设置color='g',是不是多余呢?</p>
1
回复