I created a lineplot graph to begin with using the following code:
plot = sns.lineplot(data=tips,
x="sex",
y="tip",
ci=50,
hue="day",
palette="Accent")
plot.set_title("Value of Tips Given to Waiters, by Days of the Week and Sex", fontsize=24, pad=30, fontdict={"weight": "bold"})
plot.legend("")
I have realised that its actually a catplot chart that I need so I amended the code to the following:
plot = sns.catplot (data=tips,
x="day",
y="tip",
kind='bar',
ci=50,
hue="sex",
palette="Accent")
plot.set_title("Value of Tips Given to Waiters, by Days of the Week and Sex", fontsize=24, pad=30, fontdict={"weight": "bold"})
plot.legend("")
However I am getting the following error message with the title: 'AttributeError: 'FacetGrid' object has no attribute 'set_title''.
Why is my title not working for the catplot chart?