Để hiển thị axes subplot, dùng show(). Khi tạo nhiều hình, các ảnh hiển thị bằng show().
Các bước
- Tạo x, y bằng numpy.
- Vẽ x, y bằng plot().
- Hiển thị bằng show().
Ví dụ
from matplotlib import pyplot as plt import numpy as np plt.rcParams["figure.figsize"] = [7.00, 3.50] plt.rcParams["figure.autolayout"] = True x = np.arange(10) y = np.exp(x) plt.plot(x, y) plt.show()
Kết quả
