1

I create my pairplot from data which does not have labels for its dimensions, but I would like to add a label to the x and y axes of the whole plot which explain what the individual numbers (which are the dimensions of my data) derive from.

Additionally, I would like to crop the plot so that it shows only the lower part of the plot. For this I also need to move the label of the x axis downwards.

Basically, I want the plot from this image: ideal plot

This is how I create my pairplot:

g = sns.pairplot(data=sts_df.iloc[::100, :])
g.fig.set_size_inches(width, 11)
g.set(yticks=[])
g.set(xticks=[])
g.fig.suptitle("Pairplot across 15 dimensions of STS data")
plt.show()

And this is what I currently have: enter image description here

Philipp
  • 652
  • 2
  • 10
  • 28
  • How do I rotate some of the x-axis. For example, when I have categorical data with long names that might overlap. – Xtiaan Feb 17 '23 at 12:08

1 Answers1

0

Found the solution:

g.fig.text(-0.05, 0.5, "Y Label", ha="center", fontsize = 22, rotation=90)
g.fig.text(0.5, -0.05, "X Label", ha='center', va="center", fontsize = 22)
Philipp
  • 652
  • 2
  • 10
  • 28