File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -116,14 +116,17 @@ def __init__(self, units_mapping):
116
116
"""
117
117
Parameters
118
118
-----------
119
- units_mapping : Dict[str, int]
119
+ units_mapping : dict
120
+ Mapping of category names (str) to indices (int).
120
121
"""
121
122
self ._units = units_mapping
122
123
123
124
def __call__ (self ):
125
+ # docstring inherited
124
126
return list (self ._units .values ())
125
127
126
128
def tick_values (self , vmin , vmax ):
129
+ # docstring inherited
127
130
return self ()
128
131
129
132
@@ -133,19 +136,17 @@ def __init__(self, units_mapping):
133
136
"""
134
137
Parameters
135
138
----------
136
- units_mapping : Dict[Str, int]
139
+ units_mapping : dict
140
+ Mapping of category names (str) to indices (int).
137
141
"""
138
142
self ._units = units_mapping
139
143
140
144
def __call__ (self , x , pos = None ):
141
- """
142
- Return the category label string for tick val *x*.
143
-
144
- The position *pos* is ignored.
145
- """
145
+ # docstring inherited
146
146
return self .format_ticks ([x ])[0 ]
147
147
148
148
def format_ticks (self , values ):
149
+ # docstring inherited
149
150
r_mapping = {v : self ._text (k ) for k , v in self ._units .items ()}
150
151
return [r_mapping .get (round (val ), '' ) for val in values ]
151
152
You can’t perform that action at this time.
0 commit comments