python
import matplotlib.pyplot as plt
import numpy as np
# 数据准备
orgs = ['营业部', '魏塘支行', '罗星支行', '惠民支行', '大云支行',
'西塘支行', '丁栅支行', '姚庄支行', '干窑支行', '天凝支行',
'洪溪支行', '杨庙支行', '陶庄支行', '国际业务部', '银行卡部',
'大舜支行', '商城支行', '新城区支行', '科技支行', '城西支行']
self_operating = [18409.04, 33811.87, 13801.35, 8728.69, 5214.02, 6029.48,
3999.96, 8303.28, 14361.83, 5399.76, 6163.07, 3820.29, 6239.92,
3977.57, 13337.39, 3496.24, 11757.82, 2688.50]
agent_operating = [20075.72, 37184.53, 17920.99, 10487.05, 8741.29, 7423.41,
5044.58, 8326.19, 15761.54, 5605.83, 9548.63, 5413.72,
9157.52, 4380.82, 14273.27, 3971.81, 13217.48, 3320.17]
# 绘制柱状图
x = np.arange(len(orgs))
bar_width = 0.4
plt.bar(x, self_operating, width=bar_width, label='自营理财规模')
plt.bar(x + bar_width, agent_operating, width=bar_width, label='代销理财规模')
# 显示图例和标题等信息
plt.xticks(x + bar_width / 2, orgs, rotation=90)
plt.xlabel('机构')
plt.ylabel('规模(万元)')
plt.title('各机构的自营理财规模和代销理财规模柱状图(除去清算中心)')
plt.legend()
plt.show()