标签: python matplotlib imshow
import numpy as np import matplotlib.pyplot as plt m = np.zeros((10, 10)) plt.matshow(m) ax = plt.gca() ticks = ax.get_xticks() print ticks >>> array([ -2., 0., 2., 4., 6., 8., 10.])
为什么-2处有刻度?该图未显示-2的刻度。