title: On adjusting margins in matplotlib
body: <p>I am trying to minimize margins around a 1X2 figure, a figure which are two stacked subplots. I searched a lot and came up with commands like: </p>
  
  <pre><code>self.figure.subplots_adjust(left=0.01, bottom=0.01, top=0.99, right=0.99)
  </code></pre>
  
  <p>Which leaves a <strong>large gap</strong> on top and between the subplots. Playing with these parameters, much less understanding them was tough (things like <code>ValueError: bottom cannot be &gt;= top</code>)</p>
  
  <p><img src="https://i.stack.imgur.com/1iKli.png" alt="enter image description here"></p>
  
  <hr>
  
  <p>My questions :</p>
  
  <p>What is the command to <strong>completely minimize</strong> the margins?</p>
  
  <p>What do these numbers mean, and what coordinate system does this follow (the non-standard percent thing and origin point of this coordinate system)? What are the special rules on top of this coordinate system?</p>
  
  <p>Where is the exact point this command needs to be called? From experiment, I figured out it works after you create subplots. What if you need to call it repeatedly after you resize a window and need to resize the figure to fit inside?</p>
  
  <p>What are the other methods of adjusting layouts, especially for a single subplot?</p>