0

I am having a 2 x 1 subplot which is achievable as below.

import seaborn as sns
import matplotlib.pyplot as plt

tips = sns.load_dataset("tips")
g = sns.relplot(x="total_bill", y="tip", hue="day", col="time", data=tips, facet_kws=dict(sharex=False),col_wrap=1)
g.set_xticklabels ( rotation=90, fontsize=18 )


plt.show ()

enter image description here

Currently, I have the issue whereby the x-tick label coincide with the bottom plot title.

May I know how to increase the spacing between the plots.

p.s:

Unfortunately this OP has been flag for duplicate. While the other two link may solve the issue, but these two OP does not have the keyword seaborn nor relplot. So, a new seaborn beginner like myself does not expect the two link might solve this issue thou

mpx
  • 3,081
  • 2
  • 26
  • 56

1 Answers1

3

You can adjust the vertical spacing of the graph by using subplots_adjust().

plt.subplots_adjust(hspace=0.2)

enter image description here

r-beginners
  • 31,170
  • 3
  • 14
  • 32
  • Your question has been duplicated, but if you found my answer helpful, you can still accept the answer. Take action before you go on to the next question. – r-beginners Mar 04 '21 at 14:06
  • Unfortunately this OP has been flag for duplicate. While the other two link may solve the issue, but these two OP does not have the keyword `seaborn` nor `relplot`. So, a new seaborn beginner like myself does not expect the two link might solve this issue thou. Anyhow, thanks for the suggestion – mpx Mar 05 '21 at 01:51