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

Function test_barh_decimal_center

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

Source from the content-addressed store, hash-verified

2099
2100@check_figures_equal()
2101def test_barh_decimal_center(fig_test, fig_ref):
2102 ax = fig_test.subplots()
2103 x0 = [1.5, 8.4, 5.3, 4.2]
2104 y0 = [1.1, 2.2, 3.3, 4.4]
2105 x = [Decimal(x) for x in x0]
2106 y = [Decimal(y) for y in y0]
2107 # Test image - horizontal, align-center bar chart with Decimal() input
2108 ax.barh(x, y, height=[0.5, 0.5, 1, 1], align='center')
2109 # Reference image
2110 ax = fig_ref.subplots()
2111 ax.barh(x0, y0, height=[0.5, 0.5, 1, 1], align='center')
2112
2113
2114@check_figures_equal()

Callers

nothing calls this directly

Calls 2

barhMethod · 0.80
subplotsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…