title: How to get a graph axis into standard form
body: <p>I have plotted a graph where the scale on the y axis is large (10^6) however at the moment the axis is displaying the whole number. How can i get the axis to be displayed in standard form?</p>
  
  <pre><code>range_v=142
  max_actual_diff=0
  max_ID=0.0
  
  for i in range(0,fev[ind_2008].shape[0]):
  
      id_temp=ID[ind_2008[i]]
  
      ind_2009_temp=np.where(ID[ind_2009] == id_temp)
      actual_diff=fev[ind_2008[i]]-fev[ind_2009[ind_2009_temp]]
  
      if actual_diff &gt; max_actual_diff:
          max_actual_diff=actual_diff
          max_ID=id_temp
      diff=np.abs(fev[ind_2008][i]-fev_p1)
      pdf_t, bins_t=np.histogram(diff,bins=range_v-1,range=(0,range_v))
      if i == 0:
          pdf=pdf_t
          pdf[:]=0.0
      pdf=pdf+pdf_t
  
  print max_actual_diff, max_ID
  #plot result
  x=[max_actual_diff]*3000001
  y=np.arange(0,3.000001e6,1)
  bincenters = 0.5*(bins_t[1:]+bins_t[:-1])
  fig3=plt.figure()
  plt.plot(bincenters,pdf)
  plt.plot(x,y)
  plt.xlim(0,142)
  plt.ylim(0,3e6)
  plt.xlabel('Diff in FEV Measurements')
  plt.ylabel('Frequency')
  plt.legend(['Diff in FEV Measurements','max diff between recorded fevpctECFSPR'],loc='best')
  plt.title('FEVPCT')
  #plt.show()
  plt.savefig('FEV.jpg')
  </code></pre>