@@ -335,16 +335,6 @@ def __init__(self, xdata, ydata,
335
335
if solid_joinstyle is None :
336
336
solid_joinstyle = rcParams ['lines.solid_joinstyle' ]
337
337
338
- if isinstance (linestyle , str ):
339
- ds , ls = self ._split_drawstyle_linestyle (linestyle )
340
- if ds is not None and drawstyle is not None and ds != drawstyle :
341
- raise ValueError ("Inconsistent drawstyle ({!r}) and linestyle "
342
- "({!r})" .format (drawstyle , linestyle ))
343
- linestyle = ls
344
-
345
- if ds is not None :
346
- drawstyle = ds
347
-
348
338
if drawstyle is None :
349
339
drawstyle = 'default'
350
340
@@ -1102,39 +1092,6 @@ def set_linewidth(self, w):
1102
1092
self ._dashOffset , self ._dashSeq = _scale_dashes (
1103
1093
self ._us_dashOffset , self ._us_dashSeq , self ._linewidth )
1104
1094
1105
- def _split_drawstyle_linestyle (self , ls ):
1106
- """
1107
- Split drawstyle from linestyle string.
1108
-
1109
- If *ls* is only a drawstyle default to returning a linestyle
1110
- of '-'.
1111
-
1112
- Parameters
1113
- ----------
1114
- ls : str
1115
- The linestyle to be processed
1116
-
1117
- Returns
1118
- -------
1119
- ret_ds : str or None
1120
- If the linestyle string does not contain a drawstyle prefix
1121
- return None, otherwise return it.
1122
-
1123
- ls : str
1124
- The linestyle with the drawstyle (if any) stripped.
1125
- """
1126
- for ds in self .drawStyleKeys : # long names are first in the list
1127
- if ls .startswith (ds ):
1128
- cbook .warn_deprecated (
1129
- "3.1" , message = "Passing the drawstyle with the linestyle "
1130
- "as a single string is deprecated since Matplotlib "
1131
- "%(since)s and support will be removed %(removal)s; "
1132
- "please pass the drawstyle separately using the drawstyle "
1133
- "keyword argument to Line2D or set_drawstyle() method (or "
1134
- "ds/set_ds())." )
1135
- return ds , ls [len (ds ):] or '-'
1136
- return None , ls
1137
-
1138
1095
def set_linestyle (self , ls ):
1139
1096
"""
1140
1097
Set the linestyle of the line.
@@ -1167,10 +1124,6 @@ def set_linestyle(self, ls):
1167
1124
For examples see :doc:`/gallery/lines_bars_and_markers/linestyles`.
1168
1125
"""
1169
1126
if isinstance (ls , str ):
1170
- ds , ls = self ._split_drawstyle_linestyle (ls )
1171
- if ds is not None :
1172
- self .set_drawstyle (ds )
1173
-
1174
1127
if ls in [' ' , '' , 'none' ]:
1175
1128
ls = 'None'
1176
1129
0 commit comments