matplotlib

import numpy as np
from matplotlib import pyplot as plt

x = np.arange(1, 20)
y = 2 * x + 5
plt.title("Matplotlib demo")#标题
plt.xlabel("x axis caption")#x轴
plt.ylabel("y axis caption")#y轴
plt.plot(x, y)
plt.show()

你可能感兴趣的:(matplotlib)