title: How to plot data with gaps into subplots
body: <p>I have a dataframe with gaps</p>
  <pre><code>                                    temperature 
      data                                                        
      2016-01-01 01:00:00              -8.2 
      2016-01-01 02:00:00              -8.3  
      2016-01-01 03:00:00              -9.1 
      2016-01-01 04:00:00              -9.1  
      2016-01-01 05:00:00              -9.6 
          ...                           ...     
      2020-02-29 20:00:00               5.9   
      2020-02-29 21:00:00               5.4   
      2020-02-29 22:00:00               4.7 
      2020-02-29 23:00:00               4.3 
      2020-03-01 00:00:00               4.3
  </code></pre>
  <p>Here is the code for some sample data, different from mine but the concept is the same:</p>
  <pre><code>def tworzeniedaty():
      import pandas as pd
      rng1 = list(pd.date_range(start='2016-01-01', end='2016-02-29', freq='D'))
      rng2 = list(pd.date_range(start='2016-12-15', end='2017-02-28', freq='D'))
      rng3 = list(pd.date_range(start='2017-12-15', end='2018-02-28', freq='D'))
      rng4 = list(pd.date_range(start='2018-12-15', end='2019-02-28', freq='D'))
      rng5 = list(pd.date_range(start='2019-12-15', end='2020-02-29', freq='D'))
      return rng1 + rng2 + rng3 + rng4 + rng5
  
  
  import random
  import pandas as pd
  
  lista = [random.randrange(1, 10, 1) for i in range(len(tworzeniedaty()))]
  df = pd.DataFrame({'Date': tworzeniedaty(), 'temperature': lista})
  df['Date'] = pd.to_datetime(df['Date'], format=&quot;%Y/%m/%d&quot;)
  </code></pre>
  <p>When I plot the data I get a very messy plot.
  <a href="https://i.stack.imgur.com/5hAnY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5hAnY.png" alt="enter image description here" /></a></p>
  <p>Instead I would like to get:</p>
  <p><a href="https://i.stack.imgur.com/RfTR7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RfTR7.png" alt="enter image description here" /></a></p>
  <p>It is the same question as <a href="https://stackoverflow.com/questions/50999718/how-to-plot-only-specific-months-in-a-time-series-of-several-years">How to plot only specific months in a time series of several years?</a> but I would like to do it in python and can't decipher R code.</p>