|
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
|
@@ -245,14 +245,6 @@ class Line2D(Artist):
|
245 | 245 | drawStyleKeys = (list(six.iterkeys(_drawStyles_l)) +
|
246 | 246 | list(six.iterkeys(_drawStyles_s)))
|
247 | 247 |
|
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 | 248 | # Referenced here to maintain API. These are defined in
|
257 | 249 | # MarkerStyle
|
258 | 250 | markers = MarkerStyle.markers
|
@@ -688,7 +680,7 @@ def recache(self, always=False):
|
688 | 680 | interpolation_steps = self._path._interpolation_steps
|
689 | 681 | else:
|
690 | 682 | interpolation_steps = 1
|
691 |
| - xy = self._drawstyle_conv[self._drawstyle](*self._xy.T) |
| 683 | + xy = STEP_LOOKUP_MAP[self._drawstyle](*self._xy.T) |
692 | 684 | self._path = Path(np.asarray(xy).T, None, interpolation_steps)
|
693 | 685 | self._transformed_path = None
|
694 | 686 | self._invalidx = False
|
|
0 commit comments