如果在画直方图出现please install the python3-tk package,是因为没有导包的原因

import matplotlib
In[3]: import numpy
In[4]: import pandas
In[5]: stu_tall = numpy.round(numpy.random.normal(170,15,300))
In[6]: pd_tall = pandas.Series(stu_tall)
In[7]: pd_tall.plot(kind=‘hist’)
Out[7]: <matplotlib.axes._subplots.AxesSubplot at 0x7f82cb3d34a8>
In[8]: import matplotlib.pyplot as plt
In[9]: plt.show()

猜你喜欢

转载自blog.csdn.net/weixin_44274975/article/details/88536732