首页 > 解决方案 > matplotlib.table 中的多行或多列有一个标签

问题描述

我们如何将单个标签分配给 matplotlib.table 中的多行或多列

例如,我有以下代码,其中allInfo是 pandas DataFrame。

the_table=plt.table(cellText=allInfo.values,
                    colLabels=allInfo.columns,
                    rowLabels=allInfo.index,
                    loc='right',
                    cellLoc='left')

标签: pythonmatplotlibplotlabel

解决方案


推荐阅读