I usually prefer to set plot_datapoints = False when using corner. However, as is often the case with plotting results from sampling algorithms, the data can contain outliers that are well outside percentiles one would show. The issue is that while these outliers don't contribute to the percentile bounds, they are still used to set the axis limits for each 2D histogram. Ideally, if plot_datapoints = False, the contours drawn should instead be used to generate the axis limits. The code and figures below illustrates the issue. Even though the outlier inserted at (-10, -10) does not fall into the percentile regions, it still causes the axis limits to enclose it.
import numpy as np
import matplotlib.pyplot as plt
from corner import corner
# Generate noisy 2D Gaussian
npts = 10000
x = np.random.normal(0, 1, size = npts)
y = np.random.normal(0, 1, size = npts)
# Insert outlier
x = np.append(x, [-10])
y = np.append(y, [-10])
data = np.column_stack((x, y))
corner(data, plot_density = False, plot_datapoints = False)
plt.show()
Actual result:

Desired result:

I usually prefer to set
plot_datapoints = Falsewhen using corner. However, as is often the case with plotting results from sampling algorithms, the data can contain outliers that are well outside percentiles one would show. The issue is that while these outliers don't contribute to the percentile bounds, they are still used to set the axis limits for each 2D histogram. Ideally, ifplot_datapoints = False, the contours drawn should instead be used to generate the axis limits. The code and figures below illustrates the issue. Even though the outlier inserted at (-10, -10) does not fall into the percentile regions, it still causes the axis limits to enclose it.Actual result:

Desired result:
