Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ultraplot/axes/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if this is the correct place here. This would affect fill, and area plots too. We could add this checker in the line only for now (as I don't see the point for adding it for fills and areas). We may also add it to the plot kwargs to allow to turn it off per subplot.

return
for array in args:
min_, max_ = inputs._safe_range(array)
if min_ is None or max_ is None:
Expand Down
6 changes: 6 additions & 0 deletions ultraplot/internals/rcsetup.py
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a unit smoke test

Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading