def pimp_axis(x_or_y_ax): """Remove trailing zeros. """ x_or_y_ax.set_major_formatter(ticker.FuncFormatter(ticks_formatter))