title: Scaling axis for a scatter plot in matlibplot in python
body: <p>I am working with data visualization using matlibplot. My plot has a total of 6502 data values and is working fine, but the values are close and dense. </p>
  
  <p>For example my y axis values ranges between 3 and 10 and I need to get each point between them so clearly. i.e values like 9.2 and 9.8 are to be clearly distinguished with at least a scale of 1=0.5.
  i.e all values like 3,3.5,4,4.5...10,10.5 are all seen in the output figure</p>
  
  <p>Can some one explain me how it can be done. I tired setting range using max and min values. but it didn't work. I set the limits from 3.5 to 10.5 but in the figure the axes are displayed with scaling of 1=1 and values are from 4 to 10. Please help me fix this issue</p>
  
  <p>Thanks in advance </p>
  
  <p>here's my code so far</p>
  
  <pre><code> import matplotlib.pyplot as plt
   import numpy as np
   import plotly.plotly as py
  
   c, ec = np.random.rand(2, len(votes), 10)
   fig, ax = plt.subplots()
   plt.ylim(3.5, 10.5)
   plt.grid(True)
   # where votes range from 10-1000000 and rank range from 3.5 to 10
   matplotlib.pyplot.scatter(votes,rank, c=c, edgecolor=ec)
   plot_url = py.plot_mpl(fig, filename='scatter-plot')
   matplotlib.pyplot.show()
  </code></pre>
  
  <p>and my plot is here</p>
  
  <p><img src="https://i.stack.imgur.com/1Bjmo.png" alt="scatter-plot"></p>