title: Matplotlib/Pylab - part of plot disappears after setting log scale
body: <p>I have a small code producing the following picture with this code:</p>
  
  <p>Code 1:</p>
  
  <pre><code>hist, rhist = np.histogram(r, bins=40, range=(0, 0.25))
  hist = -hist/np.trapz(rhist[:-1],hist)
  plt.plot(rhist[:-1], hist)
  </code></pre>
  
  <p>Output of code 1:
  <img src="https://i.stack.imgur.com/ws65v.png" alt="enter image description here"></p>
  
  <p>Then I try setting the plot to have a logarithmic Y axis so that I can recognise small peaks more clearly. This is the result.</p>
  
  <p>Code 2:</p>
  
  <pre><code>hist, rhist = np.histogram(r, bins=40, range=(0, 0.25))
  hist = -hist/np.trapz(rhist[:-1],hist)
  plt.semilogy(rhist[:-1], hist)
  </code></pre>
  
  <p>Output of code 2:
  <img src="https://i.stack.imgur.com/rnKpC.png" alt="enter image description here"></p>
  
  <p>As you can see, part of my plot disappears. There are 40 bins, I can however only count about 15 in the new plot. Any help will be greatly appreciated. I am using Enthought Canopy of the latest version for academic use. E.</p>
  
  <p>UPDATE: I did find a similar question <a href="https://stackoverflow.com/questions/4027778/matplotlib-data-disappears-when-i-switch-to-a-semilog-plot">here</a>, old, dead and unanswered though.</p>