I am plotting an inset into a bigger figure and I have a problem with resizing the ticks for both axes for the inset.
I have looked at this question Matplotlib make tick labels font size smaller and managed to resize ticks.
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.
Can someone tell me how to change the size of the '1e-7'? I can't find a way!
Here is the code and the figure that is causing me problems.
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))