title: How to plot outliers in time series
body: <p>Matplotlib never finishes when I plot time series outliers. Is my dataset too large or is my code incorrect?</p>
  
  <p>I've played around with some outlier detection with my time series-data and now I'm trying to plot these outliers using a scatter plot on top of a line diagram of my time series data. </p>
  
  <p>However, when I run the code below, the kernel keeps running without result until I'm forced to interrupt it. My data consists of roughly 140,000 time series data points and I have around 2,800 outliers. </p>
  
  <p>Snippet of data:</p>
  
  <pre><code>index     Time Series     Outlier
  
  2018-09-01 00:57:00     28.53     0 
  
  2018-09-01 00:58:00     28.49     0 
  
  2018-09-01 00:59:00     28.46     0 
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>fig, ax = plt.subplots(figsize = (36,36))
  
  OL = df.loc[df["Outlier"] == 1, ["Time Series"]]
  
  ax.plot(df["Time Series"], color='blue')
  ax.scatter(OL.index,OL["Time Series"], color='red')
  
  plt.show()
  </code></pre>
  
  <p>The expected output should be similar to the below graph.</p>
  
  <p><img src="https://www.kaggleusercontent.com/kf/1402686/eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2In0..CYz1v5vi-2NhQyIaXlRKIA.39fcjyseCZfYMiAWySW7LrVPmvuI8s3FlOWPXh1m0Wvgkr1ZYjauP-IAwhD3Ceb1xRdjgAGhwc5ouL7P_DDoE5Tpt3gbCp2V3w8u2U7LPeX2nWVoH6lvcK7L_asoQ4Og-MPu_W57dW8lkJfeRoMFsh5bgET_gOzs96xdI9TMwpA.yUZgf38WHG4Hkpd5X2_SAQ/__results___files/__results___39_0.png" alt="outlier graph"></p>
  
  <p>Should I change the backend? Or reduce the dataset? </p>
  
  <p>Any help would be appreciated!</p>