1# Add a column of appropriate labels
2df_reduced['measure'] = df_reduced['ActualExternal'].replace({0: 'Internal',
3 1: 'External'}
4
5g = sns.FacetGrid(df_reduced, col="measure", margin_titles=True)
6g.map(plt.hist, "ActualDepth", color="steelblue", bins=bins, width=4.5)
7
8# Adjust title and axis labels directly
9g.set_titles("{col_name}") # use this argument literally
10g.set_axis_labels(x_var="Percentage Depth", y_var="Number of Defects")
11