Skip to content

Commit

Permalink
decos, plots fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-williams committed Oct 19, 2024
1 parent 50ad206 commit 6b36a05
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
6 changes: 5 additions & 1 deletion utz/fn.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@

def decos(*args: Deco | Sequence[Deco]):
"""Compose decorators."""
decos = [ deco for decos in args for deco in decos ]
decos = [
deco
for decos in args
for deco in (decos if isinstance(decos, Sequence) else [decos])
]

def _fn(fn):
for deco in reversed(decos):
Expand Down
12 changes: 7 additions & 5 deletions utz/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,13 @@ def update_axis(
update_axes(gridcolor=grid)

if zerolines == xy_name or zerolines is True:
update_axes(
zeroline=True,
zerolinecolor=xy_grid or grid,
zerolinewidth=1,
)
zerolinecolor = xy_grid or grid
if zerolinecolor is not Unset:
update_axes(
zeroline=True,
zerolinecolor=zerolinecolor,
zerolinewidth=1,
)

xy_title = mk_title(xy_title)
if xy_title:
Expand Down

0 comments on commit 6b36a05

Please sign in to comment.