我国18年各省GDP总量
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
plt.rcParams['font.sans-serif'] = ['SimHei'] # 中文显示
shuju = {
'acreade': ['福建','河北','湖南','湖北', '四川', '河南', '浙江',
'山东', '江苏', '广东'],
'value': [35804.05,36010.27,36425.78,
39366.55, 40678.13, 48055.86, 56197.15, 76469.67,
92595.40, 97277.77]}
pdat = pd.DataFrame(shuju)
# print(pdat)
# 角度
l = pdat['value']
print(l)
N = pdat.shape[0] # 总数
width = 2 * np.pi / N
rad = np.cumsum([width] * N) # 每个扇形的起始角度
# color
# colors = ['darkgoldenrod', 'goldenrod', 'orange', 'gold', 'yellow']
colors = ['blue', 'blueviolet',