title: Specify the exact size of matplotlib figure
body: <p>I'm having a hard time to make some of my figures in my paper aligned appropriately.</p>
  
  <p>Here is the problem. I have two figures that I want to use the same x-axis. I plot two figures separately and include them as two subfigures in Latex. The problem with this: the yticklabels of the second graph take more room, which makes it look smaller than the first graph. </p>
  
  <p><a href="https://i.stack.imgur.com/8c1TK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8c1TK.png" alt="enter image description here"></a></p>
  
  <p>I specified the figsize as the same using the following code</p>
  
  <pre><code>    fig, ax = plt.subplots(figsize=(6,4))
  </code></pre>
  
  <p>But obviously when other things like titles, labels, tick labels take more space, the "main plot" appears smaller, making two subfigures misaligned. Is there any way to specify the size of the "main plot" ignoring other labels, titles, etc.?</p>
  
  <p>P.S.: I didn't use matplotlib's subplots function because I noticed a bug in pandas or matplotlib: whenever I use an inset axis, the xlabel and xticklabels will not show. So I have to get around this by plotting two figures respectively and include them as two subfigures in latex. </p>