import matplotlib.pyplot as plt
import random

fig = plt.figure(figsize=(20,8),dpi=80)

x = range(120)
a = [random.randint(20,35) for i in range(120)]
y = a

random.seed(10)

plt.plot(x,y)

_x_ticks = ["10点{}分".format(i) for i in x if i<60]
_x_ticks += ["11点{}分".format(i-60) for i in x if i>=60]
plt.xticks(x[::5],_x_ticks[::5],rotation=90)
plt.show()



坐标轴变成中文的见下期分析