# python 绘制饼状图
#-*- coding:utf-8 –*-
import matplotlib.pyplot as plt
labels = 'Automated Interpretation', 'Seismic Processing', 'Imaging and Inversion', 'Reservoir Properties'
sizes = [48.2, 20, 13.6, 18.2]
explode = (0.1, 0, 0, 0) # only "explode" the 2nd slice (i.e. 'Hogs')
fig1, ax1 = plt.subplots()
ax1.pie(sizes, explode=explode, labels=labels, autopct='%1.1f%%', shadow=True, startangle=90)
ax1.axis('equal')
plt.show()
网友评论