import matplotlib.pyplot as plt input_value=[1,2,3,4,5] #输入值 squares=[1,4,9,16,25] #输出值 #plt.plot(squares) plt.plot(input_value,squares,linewidth=5) #设置线条的粗细 plt.title("Square Numbers",fontsize=24) #给图标指定标题 plt.xlabel("Value",fontsize=14) #为x轴设置标题 plt.ylabel("Square of value",fontsize=14) #为y轴设置标题 plt.tick_params(axis='both',labelsize=14) #设置刻度标记大小 plt.show()
python matplotlib.pyplot模块命令详解
猜你喜欢
转载自blog.csdn.net/qq_24726509/article/details/81869264
今日推荐
周排行