2022年6月

import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif'] = ['SimHei'] #不加下面这两行显示的标题会乱码
plt.rcParams['axes.unicode_minus'] = False
df各档分值4.plot.bar() #柱状图(条形图)
df各档分值4.plot.bar(stacked = True) #柱状图堆积图
df各档分值4.plot.barh() #条型图
df各档分值4.plot.barh(stacked = True) #条型堆积图
df各档分值4.plot.hist(alpha=0.5) #直方图
df各档分值4.plot.hist(alpha=0.5,stacked=True,bins=20) #堆积直方图
df各档分值4.plot.box() #箱型图
df各档分值4.plot.area() #区域图
df各档分值4.plot.scatter(x="对应15档",y="分值") #散点图
df各档分值4.plot.hexbin(x="对应15档",y="分值",gridsize=25) # 蜂巢图
df各档分值4.plot(table=True)
df各档分值4['分值'].plot.pie(subplots=True,autopct="%.2f", figsize=(8,4),title="测试",rot=0)
plt.show()