9
9
import numpy as np
10
10
11
11
from matplotlib import rcParams
12
- import matplotlib .artist as artist
12
+ import matplotlib .artist as martist
13
13
import matplotlib .cbook as cbook
14
14
from matplotlib .cbook import _string_to_bool
15
15
import matplotlib .font_manager as font_manager
27
27
28
28
# This list is being used for compatibility with Axes.grid, which
29
29
# allows all Line2D kwargs.
30
- _line_AI = artist .ArtistInspector (mlines .Line2D )
30
+ _line_AI = martist .ArtistInspector (mlines .Line2D )
31
31
_line_param_names = _line_AI .get_setters ()
32
32
_line_param_aliases = [list (d )[0 ] for d in _line_AI .aliasd .values ()]
33
33
_gridline_param_names = ['grid_' + name
34
34
for name in _line_param_names + _line_param_aliases ]
35
35
36
36
37
- class Tick (artist .Artist ):
37
+ class Tick (martist .Artist ):
38
38
"""
39
39
Abstract base class for the axis ticks, grid lines and labels
40
40
@@ -81,7 +81,7 @@ def __init__(self, axes, loc, label,
81
81
loc is the tick location in data coords
82
82
size is the tick size in points
83
83
"""
84
- artist .Artist .__init__ (self )
84
+ martist .Artist .__init__ (self )
85
85
86
86
if gridOn is None :
87
87
if major and (rcParams ['axes.grid.which' ] in ('both' , 'major' )):
@@ -230,11 +230,11 @@ def get_children(self):
230
230
return children
231
231
232
232
def set_clip_path (self , clippath , transform = None ):
233
- artist .Artist .set_clip_path (self , clippath , transform )
233
+ martist .Artist .set_clip_path (self , clippath , transform )
234
234
self .gridline .set_clip_path (clippath , transform )
235
235
self .stale = True
236
236
237
- set_clip_path .__doc__ = artist .Artist .set_clip_path .__doc__
237
+ set_clip_path .__doc__ = martist .Artist .set_clip_path .__doc__
238
238
239
239
def get_pad_pixels (self ):
240
240
return self .figure .dpi * self ._base_pad / 72
@@ -289,7 +289,7 @@ def get_loc(self):
289
289
'Return the tick location (data coords) as a scalar'
290
290
return self ._loc
291
291
292
- @artist .allow_rasterization
292
+ @martist .allow_rasterization
293
293
def draw (self , renderer ):
294
294
if not self .get_visible ():
295
295
self .stale = False
@@ -669,7 +669,7 @@ def __get__(self, instance, cls):
669
669
return instance .minorTicks
670
670
671
671
672
- class Axis (artist .Artist ):
672
+ class Axis (martist .Artist ):
673
673
"""
674
674
Public attributes
675
675
@@ -687,7 +687,7 @@ def __init__(self, axes, pickradius=15):
687
687
"""
688
688
Init the axis with the parent Axes instance
689
689
"""
690
- artist .Artist .__init__ (self )
690
+ martist .Artist .__init__ (self )
691
691
self .set_figure (axes .figure )
692
692
693
693
self .isDefault_label = True
@@ -899,7 +899,7 @@ def _translate_tick_kw(kw):
899
899
return kwtrans
900
900
901
901
def set_clip_path (self , clippath , transform = None ):
902
- artist .Artist .set_clip_path (self , clippath , transform )
902
+ martist .Artist .set_clip_path (self , clippath , transform )
903
903
for child in self .majorTicks + self .minorTicks :
904
904
child .set_clip_path (clippath , transform )
905
905
self .stale = True
@@ -1141,7 +1141,7 @@ def get_tick_padding(self):
1141
1141
values .append (self .minorTicks [0 ].get_tick_padding ())
1142
1142
return max (values , default = 0 )
1143
1143
1144
- @artist .allow_rasterization
1144
+ @martist .allow_rasterization
1145
1145
def draw (self , renderer , * args , ** kwargs ):
1146
1146
'Draw the axis lines, grid lines, tick lines and labels'
1147
1147
0 commit comments