问题
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
回答1:
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))
来源:https://stackoverflow.com/questions/51290828/individual-axes-limits-for-pairplot-in-python