These values ββare simply taken from the input DataFrame field, which you use as the col or hue variable in the factorgrid graph. Therefore, it would be correct to set the values ββas you want in the original DataFrame, and then pass this to seaborn.factorplot .
Alternatively, once you have plotted, the function returns an object of the FacetGrid class, which has a method called set_titles . This allows you to change the names after more flexible plotting, but also based on the values ββin the DataFrame that you passed to the function. See the documentation for this method for more information.
The final option is to set the headers manually using the matplotlib commands. The returned FacetGrid also has an axes attribute, which is a two-dimensional array of maptlotlib axes in the figure. You can go through this and set the headers to whatever you want:
g = sns.factorplot(...) titles = ["foo", "bar", "buz"] for ax, title in zip(g.axes.flat, titles): ax.set_title(title)
source share