title: Plotting a dashed line on a log-log plot using Python's matplotlib
body: <p>I'm currently trying to place a horizontal dashed line through my log-log graph using the below code. <strong><em>K2H_HUBp[:,1]</em></strong> and <strong><em>DivR</em></strong> are two [1x6000] arrays. The variable <strong><em>ones</em></strong> is a [1x6000] array full of ones. </p>
  
  <p>The point of this plot is showing how the radii of "potatoes" compares with "sweet potatoes". Hence if they were the same, all of the data points should fall on this y = 1 line.</p>
  
  <pre><code>plt.scatter(K2H_HUBp[:,1],DivR,s=2.5,alpha=0.15,c = '#A9A9A9')
  plt.loglog(K2H_HUBp[:,1], ones, '--',dashes=(1, 1),linewidth=0.9,c='#3C323C')
  plt.ylim((0.1,10))
  plt.xlim((0.35,12))
  ax = plt.gca()
  ax.tick_params(which = 'both', direction = 'in',right='on',top='on')
  ax.set_xscale('log')
  ax.set_yscale('log')
  plt.ylabel("Radius (Potatos/Sweet Potatos)")
  plt.xlabel("Radius (Potatos)")
  </code></pre>
  
  <p>I'd like the <strong><em>ones</em></strong> line to be equally dashed through the plot. I have the problem of getting this <a href="https://i.stack.imgur.com/7qIbG.png" rel="nofollow noreferrer">graph here</a> where the lines aren't equally spaced out.</p>
  
  <p>I'm looking for the graph to be very similar to <a href="https://i.stack.imgur.com/cOoxz.png" rel="nofollow noreferrer">this</a> one (yes this is a linear graph and I'm working with a log-log graph)</p>
  
  <p>I've tried modifying the dashes() parameters with no luck.</p>
  
  <p>Thanks in advance for your guidance. :)</p>