title: Changing size of scientific notation tick labels in Matplotlib
body: <p>I am plotting an inset into a bigger figure and I have a problem with resizing the ticks for both axes for the inset.</p>
  
  <p>I have looked at this question <a href="https://stackoverflow.com/questions/6390393/matplotlib-make-tick-labels-font-size-smaller">Matplotlib make tick labels font size smaller</a> and managed to resize ticks.</p>
  
  <p>However, my ticks are plotted using scientific notation on both axes (automatically) and while that is not a problem the '1e-7' label doesn't resize with the rest of the ticks and it superimposes with the x axis label.</p>
  
  <p>Can someone tell me how to change the size of the '1e-7'? I can't find a way!</p>
  
  <p>Here is the code and the figure that is causing me problems.</p>
  
  <pre><code>logN = lognorm(s=[sigma], loc=0, scale=exp(mu))
  domain = np.linspace(logN.ppf(0.01), logN.ppf(0.99), 250)
  
  ax2.set_title('uncertainty', size = 'x-small')
  ax2.set_xlabel('exceedance frequency', size = 'x-small')
  ax2.set_ylabel('probability', size= 'x-small')
  ax2.tick_params( axis = 'both', which ='major', labelsize = 7)
  ax2.plot(domain, logN.pdf(domain))
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/v9Uqc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v9Uqc.png" alt="inset that causes problems"></a></p>