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

Function test_fillcycle_ignore

lib/matplotlib/tests/test_cycles.py:66–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64
65
66def test_fillcycle_ignore():
67 fig, ax = plt.subplots()
68 ax.set_prop_cycle(cycler('color', ['r', 'g', 'y']) +
69 cycler('hatch', ['xx', 'O', '|-']) +
70 cycler('marker', ['.', '*', 'D']))
71 t = range(10)
72 # Should not advance the cycler, even though there is an
73 # unspecified property in the cycler "marker".
74 # "marker" is not a Polygon property, and should be ignored.
75 ax.fill(t, t, 'r', hatch='xx')
76 # Allow the cycler to advance, but specify some properties
77 ax.fill(t, t, hatch='O')
78 ax.fill(t, t)
79 ax.fill(t, t)
80 assert ([p.get_facecolor() for p in ax.patches]
81 == [mpl.colors.to_rgba(c) for c in ['r', 'r', 'g', 'y']])
82 assert [p.get_hatch() for p in ax.patches] == ['xx', 'O', 'O', '|-']
83
84
85def test_property_collision_plot():

Callers

nothing calls this directly

Calls 7

cyclerFunction · 0.85
subplotsMethod · 0.45
set_prop_cycleMethod · 0.45
fillMethod · 0.45
get_facecolorMethod · 0.45
to_rgbaMethod · 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…