title: pyplot - How to set a specific range in x axis
body: <p>I have a CDF plot with data of wifi usage in MB. For better understanding I would like to present the usage starting in KB and finishing in TB. I would like to know how to set a specific range for x axis to replace the produce by plt.plot() and show the axis x, per example, as [1KB 10KB 1MB 10MB 1TB 10TB], even the space between bins not representing the real values.</p>
  
  <p><a href="https://i.stack.imgur.com/ND7lU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ND7lU.png" alt="enter image description here"></a></p>
  
  <p><strong>My code for now</strong>:</p>
  
  <pre><code>wifi = np.sort(matrix[matrix['wifi_total_mb']&gt;0]['wifi_total_mb'].values)
  
  g = sns.distplot(wifi, kde_kws=dict(cumulative=True))
  plt.show()
  </code></pre>
  
  <p>Thanks</p>
  
  <p><strong>EDIT 1</strong></p>
  
  <p>I know that I can use <code>plt.xticks</code> and i already tried it: <code>plt.xticks([0.00098, 0.00977, 1, 10, 1024, 10240, 1048576, 10485760, 24117248])</code>. These are values in MB that represents the sample range I specified before. But the plot is still wrong.</p>
  
  <p><a href="https://i.stack.imgur.com/qUsQ6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qUsQ6.png" alt="enter image description here"></a></p>
  
  <p><em>The result expected</em></p>
  
  <p>In excel it is pretty easy makes what I want to. Look the image, with the same range I get the plot I wanted.</p>
  
  <p><a href="https://i.stack.imgur.com/Zyeg5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Zyeg5.png" alt="enter image description here"></a></p>
  
  <p>Thanks</p>