title: Creating subplots with matplotlib
body: <p>I'm currently learning the basic philosophy of making plots with <code>matplotlib</code> in Python with Jupyter Notebook. My main gripe is when it comes to creating subplots, why do I have to run the code in one single chunk? And whenever I try to run it in separate steps, it throws me weird plots. For exampple:</p>
  
  <p><code>plt.subplot(211)</code></p>
  
  <p><code>plt.plot(range(10))</code></p>
  
  <p><code>plt.subplot(212, facecolor='y')</code></p>
  
  <p><code>plt.plot(randn(50))</code></p>
  
  <p>I have to excute those four lines of codes in one step as opposed to run them each in four steps. What's exactly going on here? Why is there such a difference between the two approaches?</p>