安装: pip install matplotlib
import matplotlib.pyplot as plt
# 输入值 x轴
input_values = [1,2,3,4,5]
# 输出值 y轴
squares = [1,4,9,16,25]
plt.plot(input_values, squares, linewidth=5)
# 标题
plt.title("Square Numbers", fontsize=24)
# x轴标题
plt.xlabel('value', fontsize=14)
# y轴标题
plt.ylabel('Square of value', fontsize=14)
# 设置刻度标记大小
plt.tick_params(axis='both', labelsize=14)
plt.show()