import matplotlib.pyplot as plt
square = [1,4,9,16,25]
plt.plot(square,linewidth = 5)
plt.title('Square numbers',fontsize = 24)
plt.xlabel('Value',fontsize = 24)
plt.ylabel('Suqare of Value',fontsize = 24)
plt.tick_params(axis = 'both',labelsize = 12)
plt.show()

本文介绍了一个使用Matplotlib库创建图表的简单示例。通过绘制一系列数值及其对应的平方数,展示了如何设置图表标题、坐标轴标签及刻度参数,实现美观的数据可视化效果。
2695

被折叠的 条评论
为什么被折叠?



