The values of Y are like [0, 2, 38, 47, 123, 234, 1003, 100004, 50000003, 1000000004]
The figure I want to get is just as following:
From the examples here
# log y axis
import matplotlib.pyplot as plt
import numpy as np
t = np.arange(0.01, 20.0, 0.01)
plt.subplot(221)
plt.semilogy(t, np.exp(-t/5.0))
plt.title('semilogy')
plt.grid(True)
plt.show()
So use plt.semilogy(). If you want a X-axis with a log-scale, use plt.semilogx(). For both axis on a log-scale, use plt.loglog().