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

Function test_grouped_bar_hatch_sequence

lib/matplotlib/tests/test_axes.py:2307–2318  ·  view source on GitHub ↗

Each dataset should receive its own hatch pattern when a sequence is passed.

()

Source from the content-addressed store, hash-verified

2305
2306
2307def test_grouped_bar_hatch_sequence():
2308 """Each dataset should receive its own hatch pattern when a sequence is passed."""
2309 fig, ax = plt.subplots()
2310 x = np.arange(2)
2311 heights = [np.array([1, 2]), np.array([2, 3]), np.array([3, 4])]
2312 hatches = ['//', 'xx', '..']
2313 containers = ax.grouped_bar(heights, positions=x, hatch=hatches)
2314
2315 # Verify each dataset gets the corresponding hatch
2316 for hatch, c in zip(hatches, containers.bar_containers):
2317 for rect in c:
2318 assert rect.get_hatch() == hatch
2319
2320
2321def test_boxplot_dates_pandas(pd):

Callers

nothing calls this directly

Calls 3

grouped_barMethod · 0.80
subplotsMethod · 0.45
get_hatchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…