import matplotlib.pyplot as plt
# 企业名称
companies = ['华为', '腾讯', '阿里巴巴', '京东', '恒力集团', '比亚迪', '吉利控股', '百度', '美团', '蚂蚁科技', '山东魏桥', '小米']
# 研发投入数据(单位:亿元)
investment = [6423, 614.01, 8686.87, 10462.36, 6117.57, 500, 450, 300, 200, 180, 150, 100]
# 创建条形图
plt.figure(figsize=(12, 6))
plt.bar(companies, investment, color='skyblue')
plt.xlabel('企业名称')
plt.ylabel('研发投入(亿元)')
plt.title('民企100强研发投入对比')
plt.xticks(rotation=45)
plt.grid(axis='y')
# 显示图像
plt.tight_layout()
plt.show()