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

Function test_barh_decimal_height

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

Source from the content-addressed store, hash-verified

2127
2128@check_figures_equal()
2129def test_barh_decimal_height(fig_test, fig_ref):
2130 x = [1.5, 8.4, 5.3, 4.2]
2131 y = [1.1, 2.2, 3.3, 4.4]
2132 h0 = [0.7, 1.45, 1, 2]
2133 h = [Decimal(i) for i in h0]
2134 # Test image - horizontal bar chart with Decimal() height
2135 ax = fig_test.subplots()
2136 ax.barh(x, y, height=h, align='center')
2137 # Reference image
2138 ax = fig_ref.subplots()
2139 ax.barh(x, y, height=h0, align='center')
2140
2141
2142def test_bar_color_none_alpha():

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…