title: How to fix google colab cutting of plots of confusion matrices
body: <p>I'm trying to create a confusion matrix on google colab but once I plot it and try to save it the top and the bottom of the plot get cut off. Is there any way to fix this? </p>
  
  <pre><code>%matplotlib inline
  import seaborn as sn
  import pandas as pd
  import matplotlib.pyplot as plt
  from google.colab import files
  array =  [[1, 0, 0], 
         [0, 1, 0.0101], 
        [0, 0, 0.9898]]
  df_cm = pd.DataFrame(array, index = ["REM", "Wake", "NREM"],
                columns = ["REM", "Wake", "NREM"],)
  plt.figure(figsize = (10,7))
  sn.heatmap(df_cm, annot=True, cmap="YlGnBu", linewidths=0.5)
  plt.savefig("Fid.pdf", bbox_inches='tight')
  files.download("Fid.pdf")
  </code></pre>
  
  <p>Here is the result I'm getting.  <a href="https://imgur.com/a/Y0RwHis" rel="nofollow noreferrer">https://imgur.com/a/Y0RwHis</a></p>