how can I plot values with big variance using matplotlib
<p>The values of Y are like <code>[0, 2, 38, 47, 123, 234, 1003, 100004, 50000003, 1000000004]</code></p>

<p>The figure I want to get is just as following:</p>

<p><a href="https://i.stack.imgur.com/SSHCO.png" rel="nofollow"><img src="https://i.stack.imgur.com/SSHCO.png" alt="logplot"></a></p>

<p>From the examples <a href="http://matplotlib.org/examples/pylab_examples/log_demo.html" rel="nofollow">here</a></p>

<pre><code># 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()
</code></pre>

<p>So use <code>plt.semilogy()</code>. If you want a X-axis with a log-scale, use <code>plt.semilogx()</code>. For both axis on a log-scale, use <code>plt.loglog()</code>.</p>

python matplotlib plot