@@ -43,11 +43,12 @@ def default_units(x, axis):
43
43
44
44
"""
45
45
from __future__ import print_function
46
- import numpy as np
47
- from matplotlib . cbook import iterable , is_numlike , is_string_like
46
+ from matplotlib . cbook import iterable , is_numlike
47
+
48
48
49
49
class AxisInfo :
50
- 'information to support default axis labeling and tick labeling, and default limits'
50
+ """information to support default axis labeling and tick labeling, and
51
+ default limits"""
51
52
def __init__ (self , majloc = None , minloc = None ,
52
53
majfmt = None , minfmt = None , label = None ,
53
54
default_limits = None ):
@@ -107,6 +108,7 @@ def is_numlike(x):
107
108
else :
108
109
return is_numlike (x )
109
110
111
+
110
112
class Registry (dict ):
111
113
"""
112
114
register types with conversion interface
@@ -118,7 +120,8 @@ def __init__(self):
118
120
def get_converter (self , x ):
119
121
'get the converter interface instance for x, or None'
120
122
121
- if not len (self ): return None # nothing registered
123
+ if not len (self ):
124
+ return None # nothing registered
122
125
#DISABLED idx = id(x)
123
126
#DISABLED cached = self._cached.get(idx)
124
127
#DISABLED if cached is not None: return cached
@@ -131,11 +134,11 @@ def get_converter(self, x):
131
134
132
135
if converter is None and iterable (x ):
133
136
for thisx in x :
134
- # Make sure that recursing might actually lead to a solution, if
135
- # we are just going to re-examine another item of the same kind,
136
- # then do not look at it.
137
+ # Make sure that recursing might actually lead to a solution,
138
+ # if we are just going to re-examine another item of the same
139
+ # kind, then do not look at it.
137
140
if classx and classx != getattr (thisx , '__class__' , None ):
138
- converter = self .get_converter ( thisx )
141
+ converter = self .get_converter (thisx )
139
142
return converter
140
143
141
144
#DISABLED self._cached[idx] = converter
0 commit comments