Hide tick labels and offset in matplotlib
<p>I have two subplots that share the same x-axis. I removed the xticklabels of the upper subplot, but the offset "1e7" remains visible. How can I hide it?</p>

<p>Here is the code I used :</p>

<pre><code>import matplotlib.pyplot as plt
import numpy as np

plt.figure()
s1 = plt.subplot(2,1,1)
s1.plot(np.arange(0,1e8,1e7),np.arange(10))
s1.tick_params(axis="x", labelbottom=False)

s2 = plt.subplot(2,1,2, sharex=s1)
s2.plot(np.arange(0,1e8,1e7),np.arange(10))
</code></pre>

<p>I also tried <code>s1.get_xaxis().get_major_formatter().set_useOffset(False)</code>, but it did nothing and I also tried <code>s1.get_xaxis().get_major_formatter().set_powerlimits((-9,9))</code> but it impacted also the lower suplot.</p>