|
43 | 43 |
|
44 | 44 | import matplotlib as mpl
|
45 | 45 | from matplotlib import (
|
46 |
| - _api, backend_tools as tools, cbook, colors, textpath, tight_bbox, |
| 46 | + backend_tools as tools, cbook, colors, textpath, tight_bbox, |
47 | 47 | transforms, widgets, get_backend, is_interactive, rcParams)
|
48 | 48 | from matplotlib._pylab_helpers import Gcf
|
49 | 49 | from matplotlib.backend_managers import ToolManager
|
50 |
| -from matplotlib.transforms import Affine2D |
51 |
| -from matplotlib.path import Path |
52 | 50 | from matplotlib.cbook import _setattr_cm
|
| 51 | +from matplotlib.path import Path |
| 52 | +from matplotlib.rcsetup import validate_joinstyle, validate_capstyle |
| 53 | +from matplotlib.transforms import Affine2D |
53 | 54 |
|
54 | 55 |
|
55 | 56 | _log = logging.getLogger(__name__)
|
@@ -914,7 +915,7 @@ def set_antialiased(self, b):
|
914 | 915 |
|
915 | 916 | def set_capstyle(self, cs):
|
916 | 917 | """Set the capstyle to be one of ('butt', 'round', 'projecting')."""
|
917 |
| - _api.check_in_list(['butt', 'round', 'projecting'], cs=cs) |
| 918 | + validate_capstyle(cs) |
918 | 919 | self._capstyle = cs
|
919 | 920 |
|
920 | 921 | def set_clip_rectangle(self, rectangle):
|
@@ -982,7 +983,7 @@ def set_foreground(self, fg, isRGBA=False):
|
982 | 983 |
|
983 | 984 | def set_joinstyle(self, js):
|
984 | 985 | """Set the join style to be one of ('miter', 'round', 'bevel')."""
|
985 |
| - _api.check_in_list(['miter', 'round', 'bevel'], js=js) |
| 986 | + validate_joinstyle(js) |
986 | 987 | self._joinstyle = js
|
987 | 988 |
|
988 | 989 | def set_linewidth(self, w):
|
|
0 commit comments