Answers for "AttributeError: 'FacetGrid' object has no attribute 'suptitle'"

-1

AttributeError: 'FacetGrid' object has no attribute 'suptitle'

# Add a column of appropriate labels
df_reduced['measure'] = df_reduced['ActualExternal'].replace({0: 'Internal',
                                                              1: 'External'}

g = sns.FacetGrid(df_reduced, col="measure", margin_titles=True)
g.map(plt.hist, "ActualDepth", color="steelblue", bins=bins, width=4.5)

# Adjust title and axis labels directly
g.set_titles("{col_name}")  # use this argument literally
g.set_axis_labels(x_var="Percentage Depth", y_var="Number of Defects")
Posted by: Guest on October-18-2020

Code answers related to "AttributeError: 'FacetGrid' object has no attribute 'suptitle'"

Python Answers by Framework

Browse Popular Code Answers by Language