Skip to content

Commit eeaeea8

Browse files
committed
Permit dualx/y axes with CutoffScales
1 parent 65920a8 commit eeaeea8

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

proplot/axistools.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,11 @@ def __init__(self, arg, invert=False, parent_scale=None,
855855
}
856856
kwargs['linthresh'] = inverse(kwargs['linthresh'])
857857
parent_scale = SymmetricalLogScale(**kwargs)
858+
elif isinstance(parent_scale, CutoffScale):
859+
args = list(parent_scale.args) # copy
860+
for i in range(0, len(args), 2):
861+
args[i] = inverse(args[i])
862+
parent_scale = CutoffScale(*args)
858863
functransform = parent_scale.get_transform() + functransform
859864
elif parent_scale is not None:
860865
raise ValueError(
@@ -1284,9 +1289,10 @@ def __init__(self, *args, **kwargs):
12841289
args = list(args)
12851290
if len(args) % 2 == 1:
12861291
args.append(1)
1287-
threshs = args[::2]
1288-
scales = args[1::2]
1289-
self._transform = CutoffTransform(threshs, scales)
1292+
self.args = args
1293+
self.threshs = args[::2]
1294+
self.scales = args[1::2]
1295+
self._transform = CutoffTransform(self.threshs, self.scales)
12901296

12911297

12921298
class CutoffTransform(mtransforms.Transform):

0 commit comments

Comments
 (0)