我正在尝试在seaborn中绘制箱线图,其宽度取决于x轴值的对数。我正在创建宽度列表并将其传递给 seaborn.boxplot 的 widths=widths 参数。
但是,我得到了
raise ValueError(datashape_message.format("widths"))
ValueError: List of boxplot statistics and `widths` values must have same the length
Run Code Online (Sandbox Code Playgroud)
当我调试和检查时,箱线图统计中只有一个字典,而我有 8 个箱线图。无法准确判断问题出在哪里。

我使用 pandas 数据框和seaborn 进行绘图。