ax.set_xscale('log')
ax.set_xlim(x.min(), x.max())
ax.xaxis.set_major_formatter(ticker.FuncFormatter(lambda x, pos: '{0:g}'.
    format(x - 1)))
ax.xaxis.set_major_locator(ticker.FixedLocator(x))
plt.show()
Matplotlib logarithmic scale with zero value