0

I was writing a code to make a boxplot but it is showing that

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

What should I do ???

This is my code

days = [1,2,3,4,5]
sleeping = [4,8,3,9,1]
walking = [9,6,3,7,4]
eating = [8,3,4,6,7]
playing = [2,6,7,9,3]
plt.plot([],[], color='m', label='sleeping', linewidth=5)
plt.plot([],[], color='k', label='walking', linewidth=5)
plt.plot([],[], color='g', label='eating', linewidth=5)
plt.plot([],[], color='c', label='playing', linewidth=5)
plt.boxplot(days, sleeping, walking, eating, playing, color=['m','k','g','c'])
plt.xlabel('X')
plt.ylabel('Y')
plt.title('Areaplot')
plt.legend()
plt.show()
  • Possible duplicate of: https://stackoverflow.com/questions/41997493/python-matplotlib-boxplot-color/41997865 – PeterD Feb 10 '22 at 14:59

0 Answers0