import matplotlib.pyplot as plt

# カテゴリのリスト(X軸)
categories = ['Apples', 'Bananas', 'Oranges', 'Grapes']
# 数量のリスト(Y軸)
counts = [23, 45, 15, 30]

# 棒グラフの作成
plt.bar(categories, counts)

plt.title("Fruit Counts")
plt.xlabel("Fruit Type")
plt.ylabel("Count")

# グラフの表示
plt.show()

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: