首页 > 解决方案 > 在 Python 中分离箱线图

问题描述

我有四个不同的箱线图,它们重叠。如何在 Python 中将它们分开?

我的代码在这里:

import matplotlib.pyplot as plt
import seaborn as sns

plt.boxplot(x=group_a,
notch = True)

plt.boxplot(x=group_b,
notch = True)

plt.boxplot(x=group_c,
notch = True)

plt.boxplot(x=group_d,
notch = True)

plt.title('sales values')
plt.ylabel('number of sales')

标签: pythonmatplotlibseabornboxplot

解决方案


推荐阅读