I'm fairly new to python and I'm trying to figure out how to set limits for individual axes for a pairplot. I know that using
pairplot.set(xlim=(0,100), ylim = (0,100))
will set all the axes in a pairplot to go from 0 to 100, but some of my variables range from 0 to 300000 while others range from 0 80. I'm trying to avoid the auto scale feature because I'm removing some data occasionally but want to keep the context of the original set.
I get something like below for example example
You may access the axes of the PairGrid from its .axes
attribute. For each of those axes you may set the limits as usual. E.g.
g = sns.pairplot(data)
g.axes[0,2].set_xlim((0,40))
g.axes[1,2].set_xlim((-20,20))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With