Matplotlib Tutorial - Create a bar chart
Briefly

In this Matplotlib example, I am going to create a bar chart to represent the quantity of the wear I have sold recently.import matplotlib.pyplotas plt

fig, ax = plt.subplots()wear = ['Slipper', 'Sport Shoe', 'Snicker', 'High Heel']
counts = [100, 150, 35, 16]
bar_labels = ['Slipper', 'Sport Shoe', 'Snicker', 'High Heel']
bar_colors = ['tab:green', 'tab:brown', 'tab:blue', 'tab:red']

ax.bar(wear, counts, label=bar_labels, color=bar_colors)

ax.set_ylabel('Wear Sale Quantity')
ax.set_title('Wear Sales')
ax.legend(title='Wear Sale')

plt.show()
Read at Islandtropicaman
[
]
[
|
]