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() ] )