Curious
Curious

Reputation: 276

How to set seaborn.pairplot legend fontsize

I'm trying to set the fontsize of the legend, which is automatically generated by using keyword hue in seaborn.pairplot:

g = seaborn.pairplot(df, hue='parameters', diag_kind = 'kde', palette={'r', 'g'},
                plot_kws = {'alpha': 0.6, 's': 80, 'edgecolor': 'k'},
                size = 4)

does anybody know the way of setting the fontsize of this legend (automatically generated by hue)?

Upvotes: 2

Views: 915

Answers (1)

Curious
Curious

Reputation: 276

I found the solution by using matplotlib.pyplot:

import matplotlib.pyplot as plt
plt.rc('legend',fontsize=25, title_fontsize=15)

maybe there is another (built-in in seaborn) way of setting these parameters.

Upvotes: 1

Related Questions