Skip to content

Commit d2a9f6b

Browse files
committed
TST : test plot(.., color='none')
added failing test for issue #2760
1 parent f4ec1ef commit d2a9f6b

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

lib/matplotlib/tests/test_lines.py

+14-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
def test_invisible_Line_rendering():
1515
"""
1616
Github issue #1256 identified a bug in Line.draw method
17-
17+
1818
Despite visibility attribute set to False, the draw method was not
1919
returning early enough and some pre-rendering code was executed
2020
though not necessary.
@@ -67,6 +67,19 @@ def test_set_line_coll_dash():
6767
assert True
6868

6969

70+
@cleanup
71+
def test_line_colors():
72+
fig = plt.figure()
73+
ax = fig.add_subplot(1, 1, 1)
74+
ax.plot(range(10), color='none')
75+
ax.plot(range(10), color='r')
76+
ax.plot(range(10), color='.3')
77+
ax.plot(range(10), color=(1, 0, 0, 1))
78+
ax.plot(range(10), color=(1, 0, 0))
79+
fig.canvas.draw()
80+
assert True
81+
82+
7083
@image_comparison(baseline_images=['line_collection_dashes'], remove_text=True)
7184
def test_set_line_coll_dash_image():
7285
fig = plt.figure()

0 commit comments

Comments
 (0)