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

Function test_grouped_bar_array

lib/matplotlib/tests/test_axes.py:2261–2273  ·  view source on GitHub ↗
(fig_test, fig_ref)

Source from the content-addressed store, hash-verified

2259
2260@check_figures_equal()
2261def test_grouped_bar_array(fig_test, fig_ref):
2262 categories = ['A', 'B']
2263 array = np.array([[1, 2, 3], [1.2, 2.4, 3.6]])
2264 labels = ['data1', 'data2', 'data3']
2265
2266 ax = fig_test.subplots()
2267 ax.grouped_bar(array, tick_labels=categories, labels=labels)
2268 ax.legend()
2269
2270 ax = fig_ref.subplots()
2271 list_of_datasets = [column for column in array.T]
2272 ax.grouped_bar(list_of_datasets, tick_labels=categories, labels=labels)
2273 ax.legend()
2274
2275
2276@check_figures_equal()

Callers

nothing calls this directly

Calls 3

grouped_barMethod · 0.80
subplotsMethod · 0.45
legendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…