Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Description
Bug report
Bug summary
Specifyingedges=open
and including colors throughcellColours
will result in a table without any colors.
Code for reproduction
fig,ax=plt.subplots(dpi=300)ax.axis('off')ax.axis('tight')even_color='#9CDEF6'odd_color='#6549DA'cell_text= [[0.2]*3, [0.1]*3, [0.3]*3]labels=['Linear Regression','Bayesian Ridge','MARS']columns= ['$R^2$','MAE','RMSE']cell_colors= [[even_color]*len(columns)ifi%2==0else [odd_color]*len(columns)foriinrange(len(cell_text))]table=ax.table(cellText=cell_text,rowLabels=labels,cellColours=cell_colors,colLabels=columns,loc='best',edges='open',cellLoc='center')
Actual outcome
Expected outcome
Cell colors should be applied to cells even if the table cell edges are set to open. Like the table below, but without the ugly cell lines.
Matplotlib version
- Operating system:
- Matplotlib version (
import matplotlib; print(matplotlib.__version__)
): 3.3.3 - Matplotlib backend (
print(matplotlib.get_backend())
): module://ipykernel.pylab.backend_inline - Python version: 3.9.4
- Jupyter version (if applicable): core-4.7.0, notebook-6.2.0
- Other libraries:
Installed through pip.