python如何获取matplotlib图中的坐标轴标签get_yticklabels
from matplotlib import pyplot as plt
fig = plt.figure(figsize=(16,12), dpi=(300))
ax1 = fig.add_subplot(111)
p = ax1.bar(range(5), range(5))
plt.draw()
>>> [item.get_text() for item in ax1.get_yticklabels(which='both')]
['0.0', '0.5', '1.0', '1.5', '2.0', '2.5', '3.0', '3.5', '4.0']