import matplotlib.pyplot as plt
input_values = [1, 2, 3, 4, 5]
squares = [1, 4, 9, 16, 25]
plt.plot(input_values, squares, linewidth=5) #绘图
#设置标题,给坐标轴加上标签
plt.title('Squares', fontsize=24)
plt.xlabel('Value', fontsize=14)
plt.ylabel('Squares of value', fontsize=14)
#设置刻度标记的大小
plt.tick_params(axis='both', labelsize=14)#刻度的样式
plt.show() #显示出来
Paste_Image.png