Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 916176a

Browse files
committed
Anticipate future addition of xaxis.set_offset_position
1 parent 8b5a478 commit 916176a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎proplot/axes/cartesian.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -779,9 +779,9 @@ def _update_locs(
779779
if labelloc is not None:
780780
axis.set_label_position(labelloc)
781781
if offsetloc is not None:
782-
if x == 'y':
782+
if hasattr(axis, 'set_offset_position'): # y axis (and future x axis?)
783783
axis.set_offset_position(offsetloc)
784-
elif dependencies._version_mpl >= 3.3: # NOTE: uses ugly mpl 3.3+ kludge
784+
elif x == 'x' and dependencies._version_mpl >= 3.3: # ugly mpl kludge
785785
axis._tick_position = offsetloc
786786
axis.offsetText.set_verticalalignment(REVERSE_SIDE[offsetloc])
787787

0 commit comments

Comments
 (0)