Skip to content

Commit d29fa0e

Browse files
authored
Guard abc/title width calc when text detached (#452)
1 parent 1510047 commit d29fa0e

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
@@ -3063,13 +3063,13 @@ def _update_title_position(self, renderer):
30633063
ha = aobj.get_ha()
30643064

30653065
# Get dimensions of non-empty elements
3066-
if atext:
3066+
if atext and aobj.get_figure() is not None:
30673067
awidth = (
30683068
aobj.get_window_extent(renderer)
30693069
.transformed(self.transAxes.inverted())
30703070
.width
30713071
)
3072-
if ttext:
3072+
if ttext and tobj.get_figure() is not None:
30733073
twidth = (
30743074
tobj.get_window_extent(renderer)
30753075
.transformed(self.transAxes.inverted())

0 commit comments

Comments
 (0)