import matplotlib.ticker as tkr #define how we want to change scale def numfmt(x, pos): s = int(x) return s yfmt = tkr.FuncFormatter(numfmt) ax.yaxis.set_major_formatter(yfmt)