@@ -37,18 +37,6 @@ def get_size(self, renderer):
37
37
return a_rel_size + b_rel_size , a_abs_size + b_abs_size
38
38
39
39
40
- @_api .deprecated (
41
- "3.6" , alternative = "sum(sizes, start=Fixed(0))" )
42
- class AddList (_Base ):
43
- def __init__ (self , add_list ):
44
- self ._list = add_list
45
-
46
- def get_size (self , renderer ):
47
- sum_rel_size = sum ([a .get_size (renderer )[0 ] for a in self ._list ])
48
- sum_abs_size = sum ([a .get_size (renderer )[1 ] for a in self ._list ])
49
- return sum_rel_size , sum_abs_size
50
-
51
-
52
40
class Fixed (_Base ):
53
41
"""
54
42
Simple fixed size with absolute part = *fixed_size* and relative part = 0.
@@ -204,24 +192,6 @@ def get_size(self, renderer):
204
192
return rel_size , abs_size
205
193
206
194
207
- @_api .deprecated ("3.6" , alternative = "size + pad" )
208
- class Padded (_Base ):
209
- """
210
- Return an instance where the absolute part of *size* is
211
- increase by the amount of *pad*.
212
- """
213
-
214
- def __init__ (self , size , pad ):
215
- self ._size = size
216
- self ._pad = pad
217
-
218
- def get_size (self , renderer ):
219
- r , a = self ._size .get_size (renderer )
220
- rel_size = r
221
- abs_size = a + self ._pad
222
- return rel_size , abs_size
223
-
224
-
225
195
def from_any (size , fraction_ref = None ):
226
196
"""
227
197
Create a Fixed unit when the first argument is a float, or a
@@ -239,43 +209,6 @@ def from_any(size, fraction_ref=None):
239
209
raise ValueError ("Unknown format" )
240
210
241
211
242
- @_api .deprecated ("3.6" )
243
- class SizeFromFunc (_Base ):
244
- def __init__ (self , func ):
245
- self ._func = func
246
-
247
- def get_size (self , renderer ):
248
- rel_size = 0.
249
-
250
- bb = self ._func (renderer )
251
- dpi = renderer .points_to_pixels (72. )
252
- abs_size = bb / dpi
253
-
254
- return rel_size , abs_size
255
-
256
-
257
- @_api .deprecated ("3.6" )
258
- class GetExtentHelper :
259
- _get_func_map = {
260
- "left" : lambda self , axes_bbox : axes_bbox .xmin - self .xmin ,
261
- "right" : lambda self , axes_bbox : self .xmax - axes_bbox .xmax ,
262
- "bottom" : lambda self , axes_bbox : axes_bbox .ymin - self .ymin ,
263
- "top" : lambda self , axes_bbox : self .ymax - axes_bbox .ymax ,
264
- }
265
-
266
- def __init__ (self , ax , direction ):
267
- _api .check_in_list (self ._get_func_map , direction = direction )
268
- self ._ax_list = [ax ] if isinstance (ax , Axes ) else ax
269
- self ._direction = direction
270
-
271
- def __call__ (self , renderer ):
272
- get_func = self ._get_func_map [self ._direction ]
273
- vl = [get_func (ax .get_tightbbox (renderer , call_axes_locator = False ),
274
- ax .bbox )
275
- for ax in self ._ax_list ]
276
- return max (vl )
277
-
278
-
279
212
class _AxesDecorationsSize (_Base ):
280
213
"""
281
214
Fixed size, corresponding to the size of decorations on a given Axes side.
0 commit comments