Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7a2e52 commit e3d4e5fCopy full SHA for e3d4e5f
lib/matplotlib/tests/test_lines.py
@@ -129,6 +129,18 @@ def test_valid_drawstyles():
129
with pytest.raises(ValueError):
130
line.set_drawstyle('foobar')
131
132
+
133
+def 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
@image_comparison(baseline_images=['line_collection_dashes'], remove_text=True)
146
def test_set_line_coll_dash_image():
0 commit comments