I am trying to find guidance on how to control and customize the legend in Seaborn plots but I can not find any.
To make the issue more concrete I provide a reproduc
First, to access the legend created by seaborn needs to be done via the seaborn call.
g = sns.factorplot(...)
legend = g._legend
This legend can then be manipulated,
legend.set_title("Sex")
for t, l in zip(legend.texts,("Male", "Female")):
t.set_text(l)
The result is not totally pleasing because the strings in the legend are larger than previously, hence the legend would overlap the plot
One would hence also need to adjust the figure margins a bit,
g.fig.subplots_adjust(top=0.9,right=0.7)