Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f431d48

Browse files
committed
MNT : remove LineCollection.color
Deprecated in c17e217 (2005-02-01)
1 parent d17863f commit f431d48

2 files changed

Lines changed: 6 additions & 13 deletions

File tree

doc/api/api_changes/code_removal.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,8 @@ Both ``ipython_console_highlighting`` and ``ipython_directive`` have been moved
3636
Change your import from 'matplotlib.sphinxext.ipython_directive' to
3737
'IPython.sphinxext.ipython_directive' and from 'matplotlib.sphinxext.ipython_directive' to
3838
'IPython.sphinxext.ipython_directive'
39+
40+
41+
LineCollection.color
42+
--------------------
43+
Deprecated in 2005, use ``set_color``

lib/matplotlib/collections.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,18 +1139,6 @@ def set_color(self, c):
11391139
"""
11401140
self.set_edgecolor(c)
11411141

1142-
def color(self, c):
1143-
"""
1144-
Set the color(s) of the line collection. *c* can be a
1145-
matplotlib color arg (all patches have same color), or a
1146-
sequence or rgba tuples; if it is a sequence the patches will
1147-
cycle through the sequence
1148-
1149-
ACCEPTS: matplotlib color arg or sequence of rgba tuples
1150-
"""
1151-
warnings.warn('LineCollection.color deprecated; use set_color instead')
1152-
return self.set_color(c)
1153-
11541142
def get_color(self):
11551143
return self._edgecolors
11561144
get_colors = get_color # for compatibility with old versions
@@ -1505,7 +1493,7 @@ def _set_transforms(self):
15051493
self._transforms[:, 1, 0] = widths * sin_angle
15061494
self._transforms[:, 1, 1] = heights * cos_angle
15071495
self._transforms[:, 2, 2] = 1.0
1508-
1496+
15091497
_affine = transforms.Affine2D
15101498
if self._units == 'xy':
15111499
m = ax.transData.get_affine().get_matrix().copy()

0 commit comments

Comments
 (0)