I have tried several different ways, but I have had no luck so far. I am trying to change my bar chart legend labels from (0,1,2,3,4,5,6) to (Monday, Tuesday, Wednesday Thursday, Friday, Saturday). Help please!
Asked
Active
Viewed 2,330 times
0
-
Please provide enough code so others can better understand or reproduce the problem. – Community Feb 27 '22 at 07:32
1 Answers
2
Try:
legend_labels = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
plt.legend(labels = legend_labels, title = 'Weekdays', loc = 'upper left')
plt.show()

Itzik Shamli
- 91
- 5