Sashko Lykhenko
Sashko Lykhenko

Reputation: 1664

Got an unexpected keyword argument 'label' while drawing box and whisker plot in Python Matplotlib

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()

I get error:

TypeError: boxplot() got an unexpected keyword argument 'label'

while label is a documented parameter http://matplotlib.org/api/pyplot_api.html

Upvotes: 4

Views: 9611

Answers (1)

Warren Weckesser
Warren Weckesser

Reputation: 114891

Check the docstring again. The argument is labels.

Upvotes: 6

Related Questions