Skip to content

Commit 616d81f

Browse files
committed
Stop propagating 'spineloc' if invalid 'tickloc' value
1 parent 48dc346 commit 616d81f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

proplot/axes/cartesian.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -902,10 +902,10 @@ def format(
902902
# want this sometimes! Same goes for spines!
903903
xspineloc = _not_none(xloc=xloc, xspineloc=xspineloc)
904904
yspineloc = _not_none(yloc=yloc, yspineloc=yspineloc)
905-
xtickloc = _not_none(xtickloc, xspineloc, self._get_loc('x', 'xtick'))
906-
ytickloc = _not_none(ytickloc, yspineloc, self._get_loc('y', 'ytick'))
907-
xspineloc = _not_none(xspineloc, self._get_loc('x', 'axes.spines'))
908-
yspineloc = _not_none(yspineloc, self._get_loc('y', 'axes.spines'))
905+
if isinstance(xspineloc, str) and xspineloc not in ('zero', 'center'):
906+
xtickloc = _not_none(xtickloc, xspineloc)
907+
if isinstance(yspineloc, str) and yspineloc not in ('zero', 'center'):
908+
ytickloc = _not_none(ytickloc, yspineloc)
909909
if xtickloc != 'both': # then infer others
910910
xticklabelloc = _not_none(xticklabelloc, xtickloc)
911911
if xticklabelloc in ('bottom', 'top'):

0 commit comments

Comments
 (0)