I am using Seaborn to draw Pairplots. Problem is that, for some variables, size of x-axis is small and data points are very close to each other, as can be seen below (first row of plots):
As you can see, plots in the second row are fine.
This is the code I am using:
import math
import matplotlib.pyplot as plt
import seaborn as sns
y_name = 'y'
features = data.iloc[:, :-1]
features_names = features.columns
plot_size=7
num_plots_x=10 # No. of plots in every row
num_plots_y = math.ceil(len(features_names)/num_plots_x) # No. of plots in y direction
fig = plt.figure(figsize=(plot_size*num_plots_y, plot_size*num_plots_x), facecolor='white')
axes = [fig.add_subplot(num_plots_y,1,i+1) for i in range(num_plots_y)]
for i, ax in enumerate(axes):
start_index = i * num_plots_x
end_index = (i+1) * num_plots_x
if end_index > len(features_names): end_index = len(features_names)
sns.pairplot(x_vars=features_names[start_index:end_index], y_vars=y_name, data = data)
plt.savefig('figure.png')
Is there any way that I can set size or scale of x-axis?