title: Change y-axis offset value in matplotlib
body: <p>My question is related to this <a href="https://stackoverflow.com/questions/3677368/matplotlib-format-axis-offset-values-to-whole-numbers-or-specific-number">post</a>, however the solutions there aren't working for me. Below is what I have:</p>
  
  <pre><code>import pandas as pd
  import matplotlib
  import matplotlib.pyplot as plt
  
  # Create example df
  df = pd.DataFrame({
      'date': ['2017-01-01', '2017-02-01', '2017-03-01', '2017-04-01'],
      'Actual': [10250000000, 10350000000, 10400000000, 10380000000],
      'Forecast': [9000000000, 10315000000, 10410000000, 10400000000]
  })
  
  #Plot df
  plt.rcParams["figure.figsize"] = (14, 8)
  fig = plt.figure()
  ax  = fig.add_subplot(111)
  ax.plot(df.date, df['Actual'], c='black', linewidth=3.0)
  ax.plot(df.date, df['Forecast'], c='blue')
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/R3Q7M.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R3Q7M.png" alt="Plot of df"></a>
  As you can see, the y-axis has a scale of 1e10. I want this to instead be 1e9. I tried the following solutions from the post I linked to, but they did not work:</p>
  
  <pre><code>plt.rcParams["figure.figsize"] = (14, 8)
  plt.rcParams['axes.formatter.useoffset'] = False
  fig = plt.figure()
  ax  = fig.add_subplot(111)
  ax.plot(df.date, df['Actual'], c='black', linewidth=3.0)
  ax.plot(df.date, df['Forecast'], c='blue')
  plt.show()
  </code></pre>
  
  <p>and </p>
  
  <pre><code>plt.rcParams["figure.figsize"] = (14, 8)    
  fig = plt.figure()
  ax  = fig.add_subplot(111)
  ax.plot(df.date, df['Actual'], c='black', linewidth=3.0)
  ax.plot(df.date, df['Forecast'], c='blue')
  y_formatter = matplotlib.ticker.ScalarFormatter(useOffset=False)
  ax.yaxis.set_major_formatter(y_formatter)
  plt.show()
  </code></pre>