title: Avoid plotting missing values in Seaborn
body: <p><strong>Problem</strong>: I have timeseries data of several days and I use <a href="https://seaborn.pydata.org/generated/seaborn.FacetGrid.html" rel="noreferrer">sns.FacetGrid</a> function of Seaborn python library to plot this data in facet form. In several cases, I found that mentioned seaborn function plots consecutive missing values (<code>nan</code> values) between two readings with a continuous line. While as matplotlib shows missing values as a <strong>gap</strong>, which makes sense. A demo example is as</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  import matplotlib.pyplot as plt
  import seaborn as sns
  # create timeseries data for 3 days such that day two contains NaN values
  time_duration1 = pd.date_range('1/1/2018', periods=24,freq='H')
  data1 = np.random.randn(len(time_duration1))
  ds1 = pd.Series(data=data1,index=time_duration1)
  time_duration2 = pd.date_range('1/2/2018',periods=24,freq='H')
  data2 = [float('nan')]*len(time_duration2)
  ds2 = pd.Series(data=data2,index=time_duration2)
  time_duration3 = pd.date_range('1/3/2018', periods=24,freq='H')
  data3 = np.random.randn(len(time_duration3))
  ds3 = pd.Series(data=data3,index=time_duration3)
  # combine all three days series and then convert series into pandas dataframe
  DS = pd.concat([ds1,ds2,ds3])
  DF = DS.to_frame()
  DF.plot()
  </code></pre>
  
  <p>It results into following plot
  <a href="https://i.stack.imgur.com/Q2nmE.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Q2nmE.png" alt="enter image description here"></a></p>
  
  <p>Above Matplotlib plot shows missing values with a gap.
  Now let us prepare same data for seaborn function as</p>
  
  <pre><code>DF['col'] = np.ones(DF.shape[0])# dummy column but required for facets
  DF['timestamp'] =  DF.index
  DF.columns = ['data_val','col','timestamp']
  g =  sns.FacetGrid(DF,col='col',col_wrap=1,size=2.5)
  g.map_dataframe(plt.plot,'timestamp','data_val')
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/y1HEK.png" rel="noreferrer"><img src="https://i.stack.imgur.com/y1HEK.png" alt="enter image description here"></a>  </p>
  
  <p>See, how seaborn plot shows missing data with a line. How should I force seaborn to not plot <code>nan</code> values with such a line?</p>
  
  <p>Note: This is a dummy example, and I need facet grid in any case to plot my data.</p>