Search code examples
pythonseabornfacet-grid

How to increase the font size of the FactorPlot/FacetGrid legend


The instructions from this question don't work for Seaborn FacetPlots. Would it be possible to get the method to do the same?


Solution

  • As in the linked answer you may use setp to set the properties (in this case the fontsize of the legend).

    The only difference to the linked question is that you need to do that for each axes of the FacetGrid

    g = FacetGrid( ... )
    
    for ax in g.axes.flat:
        plt.setp(ax.get_legend().get_texts(), fontsize=22)  # for legend text
        plt.setp(ax.get_legend().get_title(), fontsize=32)  # for legend title