MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_table_bbox

Function test_table_bbox

lib/matplotlib/tests/test_table.py:200–223  ·  view source on GitHub ↗
(fig_test, fig_ref)

Source from the content-addressed store, hash-verified

198
199@check_figures_equal()
200def test_table_bbox(fig_test, fig_ref):
201 data = [[2, 3],
202 [4, 5]]
203
204 col_labels = ('Foo', 'Bar')
205 row_labels = ('Ada', 'Bob')
206
207 cell_text = [[f"{x}" for x in row] for row in data]
208
209 ax_list = fig_test.subplots()
210 ax_list.table(cellText=cell_text,
211 rowLabels=row_labels,
212 colLabels=col_labels,
213 loc='center',
214 bbox=[0.1, 0.2, 0.8, 0.6]
215 )
216
217 ax_bbox = fig_ref.subplots()
218 ax_bbox.table(cellText=cell_text,
219 rowLabels=row_labels,
220 colLabels=col_labels,
221 loc='center',
222 bbox=Bbox.from_extents(0.1, 0.2, 0.9, 0.8)
223 )
224
225
226@check_figures_equal()

Callers

nothing calls this directly

Calls 2

from_extentsMethod · 0.80
subplotsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…