matplotlib画cdf(累积分布函数)图
cdf解释:
import numpy as np
from pylab import *
# Create some test data
dict1 = {1:1.22,2:1.26,3:8.9}
a = dict1.keys()
b = []
for key in a:
b.append(dict1[key])
# Plot both
xlabel('number')
ylabel('percentage(%)')
plot(a,b)
savefig(os.path.join(os.getcwd(),'pie.png'))
show()