|
17 | 17 | from . import artist, colors as mcolors
|
18 | 18 | from .artist import Artist
|
19 | 19 | from .cbook import (iterable, is_string_like, is_numlike, ls_mapper_r,
|
20 |
| - pts_to_prestep, pts_to_poststep, pts_to_midstep) |
| 20 | + STEP_LOOKUP_MAP) |
21 | 21 |
|
22 | 22 | from .path import Path
|
23 | 23 | from .transforms import Bbox, TransformedPath, IdentityTransform
|
@@ -237,22 +237,13 @@ class Line2D(Artist):
|
237 | 237 | 'steps': '_draw_steps_pre',
|
238 | 238 | }
|
239 | 239 |
|
240 |
| - # drawStyles should now be deprecated. |
241 | 240 | drawStyles = {}
|
242 | 241 | drawStyles.update(_drawStyles_l)
|
243 | 242 | drawStyles.update(_drawStyles_s)
|
244 | 243 | # Need a list ordered with long names first:
|
245 | 244 | drawStyleKeys = (list(six.iterkeys(_drawStyles_l)) +
|
246 | 245 | list(six.iterkeys(_drawStyles_s)))
|
247 | 246 |
|
248 |
| - _drawstyle_conv = { |
249 |
| - 'default': lambda x, y: (x, y), |
250 |
| - 'steps': pts_to_prestep, |
251 |
| - 'steps-pre': pts_to_prestep, |
252 |
| - 'steps-mid': pts_to_midstep, |
253 |
| - 'steps-post': pts_to_poststep |
254 |
| - } |
255 |
| - |
256 | 247 | # Referenced here to maintain API. These are defined in
|
257 | 248 | # MarkerStyle
|
258 | 249 | markers = MarkerStyle.markers
|
@@ -688,7 +679,7 @@ def recache(self, always=False):
|
688 | 679 | interpolation_steps = self._path._interpolation_steps
|
689 | 680 | else:
|
690 | 681 | interpolation_steps = 1
|
691 |
| - xy = self._drawstyle_conv[self._drawstyle](*self._xy.T) |
| 682 | + xy = STEP_LOOKUP_MAP[self._drawstyle](*self._xy.T) |
692 | 683 | self._path = Path(np.asarray(xy).T, None, interpolation_steps)
|
693 | 684 | self._transformed_path = None
|
694 | 685 | self._invalidx = False
|
|
0 commit comments