data = {}
data['dataset1'] = {}
data['dataset2'] = {}
data['dataset3'] = {}
n = 500
for k, v in data.items():
    upper = random.randint(0, 1000)
v['A'] = np.random.uniform(0, upper, size=n)
v['B'] = np.random.uniform(0, upper, size=n)
v['C'] = np.random.uniform(0, upper, size=n)
fig, axes = plt.subplots(ncols=3, sharey=True)
fig.subplots_adjust(wspace=0)
for ax, name in zip(axes, ['dataset1', 'dataset2', 'dataset3']):
    ax.boxplot([data[name][item] for item in ['A', 'B', 'C']])
ax.set(xticklabels=['A', 'B', 'C'], xlabel=name)
ax.margins(0.05)
plt.show()
how to make a grouped boxplot graph in matplotlib