在python 3中绘制图形

时间:2018-02-18 13:49:53

标签: python-3.x matplotlib

#..import matplotlib.pyplot as plt

plt.plot([0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18,
0.19,0.20,0.21,0.22,0.23,0.24,0.25,0.26, 0.27, 0.28, 0.29, 0.30, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.40, 0.41, 0.42, 0.43,0.44,
0.45,0.46,0.47,0.48,0.49,0.50,0.51,0.52,0.53,0.54,0.55,0.56],
[1.97,2.07,2.28,2.44,2.5,2.86,2.97,3.19,3.37,3.6,3.69,3.89,4.3,4.32,4.64,4.78,5.23,5.36,5.73,5.74,5.99,6.48, 6.34, 7.09, 7.23,
7.7,8.11,8,17,9.43,9.47,9.74,10.31,11.28,12.08,12.25,14.15,14.21,15.47,15.75,18.26,19.58,20.58,20.95,24.68,24.8,27.56, 31.84,
33.73, 36.4, 46.86, 50.7, 56.76, 63.61, 76.59, 103.05, 134.67],
'o', ms=10, markerfacecolor="None", markeredgecolor='black',  markeredgewidth=1)  

plt.axis((0, 0.59,  0, 150.00))

plt.title("Para L = 256")

plt.xlabel("Probabilidade de existir uma árvore (p)")

plt.ylabel("Tempo de vida médio da floresta (tv) ")

plt.grid(True)

plt.show()***

0 个答案:

没有答案