当绘制按另一列分组的 pandas 箱线图时,pandas 会自动为绘图添加标题,显示“箱线图按...分组”。有没有办法删除它?我尝试使用
suptitle('')
根据 Pandas: boxplot of one column based on another column
但这似乎行不通。我正在使用最新的 pandas (0.13.1) 版本。
最佳答案
确保你调用的suptitle('')
在右图中。
In [23]: axes = df.boxplot(by='g')
In [24]: fig = axes[0][0].get_figure()
In [25]: fig.suptitle('')
Out[25]: <matplotlib.text.Text at 0x109496090>
关于python - 没有为 pandas boxplot (groupby) 设置标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23507229/