From f45ebcf6fd8bc0243849a9cfb540694059eafa07 Mon Sep 17 00:00:00 2001 From: cvanelteren Date: Tue, 20 Jan 2026 14:26:18 +1000 Subject: [PATCH] Fix: Correct label size calculation in _update_outer_abc_loc --- ultraplot/axes/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ultraplot/axes/base.py b/ultraplot/axes/base.py index c4603c506..f9624d64a 100644 --- a/ultraplot/axes/base.py +++ b/ultraplot/axes/base.py @@ -2889,10 +2889,10 @@ def _update_outer_abc_loc(self, loc): # Get the size of tick labels if they exist has_labels = True if axis.get_ticklabels() else False # Estimate label size; note it uses the raw text representation which can be misleading due to the latex processing - if has_labels: + if has_labels and axis.get_ticklabels(): _offset = max( [ - len(l.get_text()) + l.get_fontsize() + len(l.get_text()) * l.get_fontsize() * 0.6 for l in axis.get_ticklabels() ] )