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

Function test_valid_input_forms

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

Source from the content-addressed store, hash-verified

107
108
109def test_valid_input_forms():
110 fig, ax = plt.subplots()
111 # These should not raise an error.
112 ax.set_prop_cycle(None)
113 ax.set_prop_cycle(cycler('linewidth', [1, 2]))
114 ax.set_prop_cycle('color', 'rgywkbcm')
115 ax.set_prop_cycle('lw', (1, 2))
116 ax.set_prop_cycle('linewidth', [1, 2])
117 ax.set_prop_cycle('linewidth', iter([1, 2]))
118 ax.set_prop_cycle('linewidth', np.array([1, 2]))
119 ax.set_prop_cycle('color', np.array([[1, 0, 0],
120 [0, 1, 0],
121 [0, 0, 1]]))
122 ax.set_prop_cycle('dashes', [[], [13, 2], [8, 3, 1, 3]])
123 ax.set_prop_cycle(lw=[1, 2], color=['k', 'w'], ls=['-', '--'])
124 ax.set_prop_cycle(lw=np.array([1, 2]),
125 color=np.array(['k', 'w']),
126 ls=np.array(['-', '--']))
127
128
129def test_cycle_reset():

Callers

nothing calls this directly

Calls 3

cyclerFunction · 0.85
subplotsMethod · 0.45
set_prop_cycleMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…