Using seaborn's FacetGrid, I'd like to update the 'hue' grouping parameter between multiple mapping calls. Specifically, I initially have a custom plotting function that takes a 'hue' grouping, on top of which I want to show the average across groups (so ignoring hue, and summarizing all the data).
e.g.
g = sns.FacetGrid(tips, col="time", hue="smoker")
g = (g.map(plt.scatter, "total_bill", "tip", edgecolor="w").add_legend())
g = (g.map(sns.regplot, "total_bill", "tip").add_legend())
Will create one colored regression line for each group. How can I update FacetGrid to ignore the hue
grouping on the second call to map
? In this example, I want to have two colored scatter plots with a single (black) regression line overlaid.