在 Python Matplotlib 中绘制盒须图时出现意外的关键字参数“标签" [英] Got an unexpected keyword argument 'label' while drawing box and whisker plot in Python Matplotlib
本文介绍了在 Python Matplotlib 中绘制盒须图时出现意外的关键字参数“标签"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的是 python matplotlib 版本 1.4.3当我尝试设置 label
参数时:
I am using python matplotlib version 1.4.3
When I try to set label
parameter:
import matplotlib.pyplot as plt
data = [[1,2,3],[4,5,6],[5,6,7]]
plt.boxplot(data, label=list('abc'))
plt.show()
我收到错误消息:
TypeError: boxplot() 得到一个意外的关键字参数 'label'
而 label
是已记录的参数 http://matplotlib.org/api/pyplot_api.html
推荐答案
再次检查文档字符串.参数是 labels
.
Check the docstring again. The argument is labels
.
这篇关于在 Python Matplotlib 中绘制盒须图时出现意外的关键字参数“标签"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文