Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Tables with open edges do not color table cells #20100

Open
@K20shores

Description

@K20shores

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

image

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.

image

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp