The documentation has a width option:
widths: array-like, default = 0.5
It is either a scalar or a vector and sets the width of each window. The default value is 0.5 or 0.15 * (the distance between the extreme positions), if it is less.
Here is an example:
import numpy as np
import matplotlib.pyplot as plt
np.random.seed(937)
data = np.random.lognormal(size=(37, 4), mean=1.5, sigma=1.75)
labels = list('ABCD')
fs = 10
plt.boxplot(data, labels=labels, showfliers=False, widths=(1, 0.5, 1.2, 0.1))
plt.show()

source
share