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

Function test_set_drawstyle

lib/matplotlib/tests/test_lines.py:133–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

131
132
133def test_set_drawstyle():
134 x = np.linspace(0, 2*np.pi, 10)
135 y = np.sin(x)
136
137 fig, ax = plt.subplots()
138 line, = ax.plot(x, y)
139 line.set_drawstyle("steps-pre")
140 assert len(line.get_path().vertices) == 2*len(x)-1
141
142 line.set_drawstyle("default")
143 assert len(line.get_path().vertices) == len(x)
144
145
146@image_comparison(['line_collection_dashes'], remove_text=True, style='mpl20',

Callers

nothing calls this directly

Calls 4

set_drawstyleMethod · 0.80
subplotsMethod · 0.45
plotMethod · 0.45
get_pathMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…