1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| from matplotlib import pyplot as plt import matplotlib import numpy as np import os.path as pa
matplotlib.rc("font", family='DengXian', weight='bold') res = '../../Assets'
arr_a = np.arange(1, 10) arr_b = np.arange(1, 10)
plt.figure(figsize=(14, 6), dpi=80), plt.title("图表", size=20) plt.plot(arr_a, arr_b, color='#442244')
plt.xticks(arr_a), plt.yticks(arr_b) plt.xlim(0, len(arr_a) + 1), plt.ylim(0, max(arr_b) + 1) plt.xlabel("x坐标", size=20), plt.ylabel("y坐标", size=20)
plt.show()
|