I am trying to create a FacetGrid in Seaborn
My code is currently:
g = sns.FacetGrid(df_reduced, col="ActualExternal", margin_titles=True)
bins = np.linspace(0, 100, 20)
g.map(plt.hist, "ActualDepth", color="steelblue", bins=bins, width=4.5)
This gives my the Figure
Now, instead of "ActualExternal = 0.0" and "ActualExternal = 1.0", I would like the titles "Internal" and "External"
And, instead of "ActualDepth" I would like the xlabel to say "Percentage Depth"
Finally, I would like to add a ylabel of "Number of Defects".
seaborn.FacetGrid
, it's better to directly use figure-level functions likeg = sns.displot(data=df_reduced, kind='hist', ...)
instead ofsns.FacetGrid
. The answers still work for this. – Neill