Skip to content

Commit 2803407

Browse files
committed
secondary axes: lazily invert forward transform
1 parent ed46a19 commit 2803407

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/axes/_secondary_axes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@ def set_functions(self, functions):
153153
self._functions = functions
154154
elif isinstance(functions, Transform):
155155
self._functions = (
156-
functions.transform, functions.inverted().transform)
156+
functions.transform,
157+
lambda x: functions.inverted().transform(x)
158+
)
157159
elif functions is None:
158160
self._functions = (lambda x: x, lambda x: x)
159161
else:

0 commit comments

Comments
 (0)