📜  水平条形图 matplotlib - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:17.495000             🧑  作者: Mango

代码示例3
import matplotlib.pyplot as plt
   
Product = ['Computer','Monitor','Laptop','Printer','Tablet']
Quantity = [320,450,300,120,280]

plt.barh(Product,Quantity)
plt.title('Store Inventory')
plt.ylabel('Product')
plt.xlabel('Quantity')
plt.show()