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

Function test_bar_broadcast_args

lib/matplotlib/tests/test_axes.py:8149–8157  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8147
8148
8149def test_bar_broadcast_args():
8150 fig, ax = plt.subplots()
8151 # Check that a bar chart with a single height for all bars works.
8152 ax.bar(range(4), 1)
8153 # Check that a horizontal chart with one width works.
8154 ax.barh(0, 1, left=range(4), height=1)
8155 # Check that edgecolor gets broadcast.
8156 rect1, rect2 = ax.bar([0, 1], [0, 1], edgecolor=(.1, .2, .3, .4))
8157 assert rect1.get_edgecolor() == rect2.get_edgecolor() == (.1, .2, .3, .4)
8158
8159
8160def test_invalid_axis_limits():

Callers

nothing calls this directly

Calls 4

barhMethod · 0.80
subplotsMethod · 0.45
barMethod · 0.45
get_edgecolorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…