@@ -79,14 +79,15 @@ def limit_range_for_scale(self, vmin, vmax, minpos):
79
79
return vmin , vmax
80
80
81
81
82
- class TransformScaleBase ( Transform ):
82
+ class _TransformScaleCopyable ( ):
83
83
"""Base transform for scales to allow a deep copy"""
84
84
def __deepcopy__ (self , memo ):
85
85
return self .frozen ()
86
86
87
+ __copy__ = __deepcopy__
87
88
88
- class LinearTransform ( TransformScaleBase , IdentityTransform ):
89
- """Mixed class for Identity"""
89
+
90
+ class LinearTransform ( _TransformScaleCopyable , IdentityTransform ):
90
91
pass
91
92
92
93
@@ -124,9 +125,9 @@ def get_transform(self):
124
125
return LinearTransform ()
125
126
126
127
127
- class FuncTransform (TransformScaleBase ):
128
+ class FuncTransform (_TransformScaleCopyable , Transform ):
128
129
"""
129
- A simple transform that takes and arbitrary function for the
130
+ A transform that takes and arbitrary function for the
130
131
forward and inverse transform.
131
132
"""
132
133
@@ -202,7 +203,7 @@ def set_default_locators_and_formatters(self, axis):
202
203
axis .set_minor_locator (NullLocator ())
203
204
204
205
205
- class LogTransform (TransformScaleBase ):
206
+ class LogTransform (_TransformScaleCopyable , Transform ):
206
207
input_dims = output_dims = 1
207
208
208
209
@_api .rename_parameter ("3.3" , "nonpos" , "nonpositive" )
@@ -244,7 +245,7 @@ def inverted(self):
244
245
return InvertedLogTransform (self .base )
245
246
246
247
247
- class InvertedLogTransform (TransformScaleBase ):
248
+ class InvertedLogTransform (_TransformScaleCopyable , Transform ):
248
249
input_dims = output_dims = 1
249
250
250
251
def __init__ (self , base ):
@@ -370,7 +371,7 @@ def get_transform(self):
370
371
return self ._transform
371
372
372
373
373
- class SymmetricalLogTransform (TransformScaleBase ):
374
+ class SymmetricalLogTransform (_TransformScaleCopyable , Transform ):
374
375
input_dims = output_dims = 1
375
376
376
377
def __init__ (self , base , linthresh , linscale ):
@@ -402,7 +403,7 @@ def inverted(self):
402
403
self .linscale )
403
404
404
405
405
- class InvertedSymmetricalLogTransform (TransformScaleBase ):
406
+ class InvertedSymmetricalLogTransform (_TransformScaleCopyable , Transform ):
406
407
input_dims = output_dims = 1
407
408
408
409
def __init__ (self , base , linthresh , linscale ):
@@ -505,7 +506,7 @@ def get_transform(self):
505
506
return self ._transform
506
507
507
508
508
- class LogitTransform (TransformScaleBase ):
509
+ class LogitTransform (_TransformScaleCopyable , Transform ):
509
510
input_dims = output_dims = 1
510
511
511
512
@_api .rename_parameter ("3.3" , "nonpos" , "nonpositive" )
@@ -531,7 +532,7 @@ def __str__(self):
531
532
return "{}({!r})" .format (type (self ).__name__ , self ._nonpositive )
532
533
533
534
534
- class LogisticTransform (TransformScaleBase ):
535
+ class LogisticTransform (_TransformScaleCopyable , Transform ):
535
536
input_dims = output_dims = 1
536
537
537
538
@_api .rename_parameter ("3.3" , "nonpos" , "nonpositive" )
0 commit comments