Skip to content

Commit 5a5a754

Browse files
authored
Fix: Correct label size calculation in _update_outer_abc_loc (#485)
1 parent df330c9 commit 5a5a754

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ultraplot/axes/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2889,10 +2889,10 @@ def _update_outer_abc_loc(self, loc):
28892889
# Get the size of tick labels if they exist
28902890
has_labels = True if axis.get_ticklabels() else False
28912891
# Estimate label size; note it uses the raw text representation which can be misleading due to the latex processing
2892-
if has_labels:
2892+
if has_labels and axis.get_ticklabels():
28932893
_offset = max(
28942894
[
2895-
len(l.get_text()) + l.get_fontsize()
2895+
len(l.get_text()) * l.get_fontsize() * 0.6
28962896
for l in axis.get_ticklabels()
28972897
]
28982898
)

0 commit comments

Comments
 (0)