title: matplotlib how to plot semilog graph with yticks and horizontal grid lines spaced logarithmically
body: <p>I want to plot some y data in range 20000 to 50000. </p>
  
  <p>I want the y axis to go from 10000 to 60000 in steps of 5000.<br>
  I want the y axis to be a log plot.</p>
  
  <p>I tried <code>ax1.set_yscale('log')</code>. This gave a log plot but no horizontal grid lines and no y ticks.</p>
  
  <p>How do I get grid lines in both directions and y ticks going up 10000, 15000 etc., with a log spacing? </p>
  
  <p>I am trying to get a yaxis scale like this</p>
  
  <p><img src="https://i.stack.imgur.com/ujjux.gif" alt="enter image description here"></p>
  
  <p>I'm using the following code in Python 2.5.2:</p>
  
  <pre><code>fig = pl.figure()
  rcParams['figure.figsize'] = 14, 10 # set graph size
  ax1 = fig.add_subplot(1, 1, 1)
  ax1.plot(do,line,'r-', do,ind,'g-')  
  ax1.grid(True)
  pl.xticks(do,rotation=45)
  ax1.set_xlim( [date1, date2] )
  ax1.set_yscale('log')
  pl.show()
  </code></pre>
  
  <p>I could calculate <code>log(line)</code> and <code>log(ind)</code> and do a linear plot but the graph would not be as informative!</p>