How to change size of axis labels and values in seaborn pairsplot

Viewed 5332

I've created a pairplot in seaborn using the following code:

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline

mtcars = pd.read_csv("https://raw.githubusercontent.com/focods/WonderfulML/master/data/mtcars.csv")
sns.pairplot(mtcars, kind='reg', diag_kind='hist')

and get this plot:

enter image description here

The font is tiny and I'm trying to figure out how to increase the size. I see in the documentation a parameter that might be what I'm looking for: plot_kws which is a dictionary, but how do I figure out the available keys and what they do?

So I have two questions. First, is how to read the documentation so that I can figure out what the keys are for this dictionary. Second, is how to increase the font size of the y-axis labels for this plot.

2 Answers

Resize the graph with all the parameters.

seabornInstance.set_context("paper", rc={"axes.labelsize":20})
seabornInstance.set_context("talk", font_scale=1.4)
xpl=seabornInstance.pairplot(mtcars, kind='reg', diag_kind='hist',height=7, aspect=1)
Related