Skip to content

Commit 6fd1959

Browse files
committed
Ensure linear axis scaling
1 parent 680f33e commit 6fd1959

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

xplt/timestructure.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,10 @@ def _link_cv_duty_axes(
841841
"""
842842
xy = "x" if orientation[0].lower() in "xh" else "y"
843843
ax_cv, ax_duty = (ax, at) if twin_is_duty else (at, ax)
844+
if getattr(ax, f"get_{xy}scale")() != "linear":
845+
raise NotImplementedError(
846+
"Linked cv and duty axes are only supported for linear scaling!"
847+
)
844848

845849
cv2duty = lambda cv: factor_duty / (1 + (cv / factor_cv) ** 2)
846850
duty2cv = lambda du: factor_cv * (factor_duty / du - 1) ** 0.5

0 commit comments

Comments
 (0)