Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/matplotlib/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ def table(ax,
# assume just colours are needed
rows = len(cellColours)
cols = len(cellColours[0])
cellText = [[''] * rows] * cols
cellText = [[''] * cols] * rows

rows = len(cellText)
cols = len(cellText[0])
Expand Down
9 changes: 8 additions & 1 deletion lib/matplotlib/tests/test_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,20 @@

import matplotlib.pyplot as plt
import numpy as np
from matplotlib.testing.decorators import image_comparison
from matplotlib.testing.decorators import image_comparison, cleanup

from matplotlib.table import CustomCell
from matplotlib.path import Path
from nose.tools import assert_equal


@cleanup
def test_non_square():
# Check that creating a non-square table works
cellcolors = ['b', 'r']
plt.table(cellColours=cellcolors)


@image_comparison(baseline_images=['table_zorder'],
extensions=['png'],
remove_text=True)
Expand Down