title: How to remove scientific notation on a matplotlib log-log plot
body: <p>I know that this question has been asked before, but I tried all the possible solutions and none of them worked for me.</p>
  
  <p>So, I have a log-log plot in matplotlib, and I would like to avoid scientific notation on the x-axis.</p>
  
  <p>This is my code:</p>
  
  <pre><code>from numpy import array, log, pi
  import matplotlib.pyplot as plt
  from scipy.optimize import curve_fit
  import matplotlib.ticker as mticker
  
  plt.rc('axes.formatter', useoffset=False)
  
  tc = array([7499680.0, 12508380.0, 23858280.0, 34877020.0, 53970660.0, 89248580.0, 161032860.0, 326814160.0, 784460200.0])
  
  theta = array([70, 60, 50, 45, 40, 35, 30, 25, 20])
  
  plt.scatter(theta,tc)
  
  ax=plt.gca()
  
  ax.set_xscale('log')
  ax.set_yscale('log')
  
  ax.xaxis.set_major_formatter(mticker.ScalarFormatter())
  ax.xaxis.get_major_formatter().set_scientific(False)
  ax.xaxis.get_major_formatter().set_useOffset(False)
  
  plt.show()
  </code></pre>
  
  <p>And this is the output:
  <a href="https://i.stack.imgur.com/dW00s.png" rel="noreferrer"><img src="https://i.stack.imgur.com/dW00s.png" alt="Output"></a></p>
  
  <p>As you can see, the numbers on the x-axis are still in scientific notation. I would like to display them as 20, 30, 40... I tried every possible solution with no result.</p>
  
  <p>Thank you very much to everyone that will help.</p>
  
  <p>NB. I can't use the plt.loglog() command, because I am doing some curve fitting on the data and I need it like that.</p>
  
  <p>NB2. I noticed a very weird thing happening: if I change the code to yaxis.get_mayor_formatter()..., it works on the y-axis! It is just on the x one that it's not working. How is it possible?</p>
  
  <p>Edit: maybe it is not clear, but if you look at the code, there are 3 methods that should affect the display of the x-ticks: <code>plt.rc('axes.formatter', useoffset=False)</code>, <code>ax.xaxis.set_major_formatter(mticker.ScalarFormatter())</code> and <code>ax.xaxis.get_major_formatter().set_scientific(False)</code>. They are 3 methods that should all do the trick alone, according to what I found around, but they don't. Of course I also tried them one by one and not all together. </p>