This is a snippet of my code:
import pandas as pd
import seaborn as sns
filename = 'MY_FILENAME_GOES_HERE'
enctimes=pd.read_csv(filename,skiprows=10)
sns.displot(enctimes,kde=True, legend=False, bins=bins).set(title='Encoding Times %s, number frames %d' %(fileForTitle,len(enctimes)),xlabel='usec')
plt.show()
Why does it cut off the title and how do I fix it?
You can use
plt.tight_layout
(see Tight Layout guide) to fit the title automatically. Here is a sample edit of your code snippet:Executing this will output: