diff --git a/ultraplot/axes/plot.py b/ultraplot/axes/plot.py index 7aacaaa27..7347a33d9 100644 --- a/ultraplot/axes/plot.py +++ b/ultraplot/axes/plot.py @@ -3497,6 +3497,8 @@ def _fix_sticky_edges(self, objs, axis, *args, only=None): Fix sticky edges for the input artists using the minimum and maximum of the input coordinates. This is used to copy `bar` behavior to `area` and `lines`. """ + if not rc["plot.sticky"]: + return for array in args: min_, max_ = inputs._safe_range(array) if min_ is None or max_ is None: diff --git a/ultraplot/internals/rcsetup.py b/ultraplot/internals/rcsetup.py index 3b94e8ec0..969f6649b 100644 --- a/ultraplot/internals/rcsetup.py +++ b/ultraplot/internals/rcsetup.py @@ -1050,6 +1050,12 @@ def _validator_accepts(validator, value): _validate_float, "Vertical margin around ribbon diagrams (axes-relative units).", ), + # Plot settings + "plot.sticky": ( + True, + _validate_bool, + "Whether to use sticky edges for line and area plots by default.", + ), "ribbon.rowheightratio": ( 2.2, _validate_float,