title: Plotting high precision data as axis ticks or transforming it to different values?
body: <p>I am trying to plot some data as a histogram in matplotlib using a high precision values as x-axis ticks. The data is between 0 and 0.4, but most values are really close like:</p>
  
  <blockquote>
    <p>0.05678, 0.05879, 0.125678, 0.129067</p>
  </blockquote>
  
  <p>I used <code>np.around()</code> in order to make the values (and it made them as it should from 0 to 0.4) less but it didn't work quite right for all of the data.
  Here is an example of the one that worked somewhat right -></p>
  
  <p><a href="https://i.stack.imgur.com/ikMvu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ikMvu.png" alt=""></a></p>
  
  <p>and one that didn't -><a href="https://i.stack.imgur.com/0MDkt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0MDkt.png" alt="enter image description here"></a></p>
  
  <p>you can see there are points after 0.4 which is just not right. 
  Here is the code I used in <code>Jupyter Notebook</code>:</p>
  
  <pre><code>plt.hist(x=[advb_ratios,adj_ratios,verb_ratios],color = ['r','y','b'], bins =10, label = ['adverbs','adjectives', 'verbs'])
  plt.xticks(np.around(ranks,1))
  plt.xlabel('Argument Rank')
  plt.ylabel('Frequency')
  plt.legend()
  plt.show()
  </code></pre>
  
  <p>It is the same for both histograms only different <code>x</code> that I am plotting, all <code>x</code> values that are used are between <code>0 and 1</code>.</p>
  
  <p><strong>So my questions are:</strong> </p>
  
  <ol>
  <li>Is there a way to fix that and reflect my data as it is? </li>
  <li>Is it better to give my <code>rank</code> values different labels that will separate them more from one another for example - 1,2,3,4 or I will lose the precision of my data and some useful info? </li>
  <li>What is the general approach in such situations? Would a different graphic help? What?</li>
  </ol>