问题已经解决,谢谢!
def make_prob_plot():
sizes = [10, 100, 1000, 5000]
for sample_size in sizes:
t_dist, x_axis = make_t_distribution(sample_size, 0, 2)
plt.plot(x_axis,t_dist.pdf(x_axis))
plt.plot(x_axis,stats.norm.pdf(x_axis,0,2),'-')
lengends = []
for x in sizes:
lengends.append('t_dist:{0}'.format(x))
lengends.append('norm:{0}'.format(x))
plt.legend(lengends)
plt.show()
return None