@@ -43,11 +43,12 @@ def default_units(x, axis):
4343
4444"""
4545from __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+
4848
4949class 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"""
5152 def __init__ (self , majloc = None , minloc = None ,
5253 majfmt = None , minfmt = None , label = None ,
5354 default_limits = None ):
@@ -107,6 +108,7 @@ def is_numlike(x):
107108 else :
108109 return is_numlike (x )
109110
111+
110112class Registry (dict ):
111113 """
112114 register types with conversion interface
@@ -118,7 +120,8 @@ def __init__(self):
118120 def get_converter (self , x ):
119121 'get the converter interface instance for x, or None'
120122
121- if not len (self ): return None # nothing registered
123+ if not len (self ):
124+ return None # nothing registered
122125 #DISABLED idx = id(x)
123126 #DISABLED cached = self._cached.get(idx)
124127 #DISABLED if cached is not None: return cached
@@ -131,11 +134,11 @@ def get_converter(self, x):
131134
132135 if converter is None and iterable (x ):
133136 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.
137140 if classx and classx != getattr (thisx , '__class__' , None ):
138- converter = self .get_converter ( thisx )
141+ converter = self .get_converter (thisx )
139142 return converter
140143
141144 #DISABLED self._cached[idx] = converter
0 commit comments