@@ -388,6 +388,11 @@ def suptitle(self, t, **kwargs):
388388 'size' : 'figure.titlesize' , 'weight' : 'figure.titleweight' }
389389 return self ._suplabels (t , info , ** kwargs )
390390
391+ def get_suptitle (self ):
392+ """Return the suptitle as string or an empty string if not set."""
393+ text_obj = self ._suptitle
394+ return "" if text_obj is None else text_obj .get_text ()
395+
391396 @_docstring .Substitution (x0 = 0.5 , y0 = 0.01 , name = 'supxlabel' , ha = 'center' ,
392397 va = 'bottom' , rc = 'label' )
393398 @_docstring .copy (_suplabels )
@@ -398,6 +403,11 @@ def supxlabel(self, t, **kwargs):
398403 'size' : 'figure.labelsize' , 'weight' : 'figure.labelweight' }
399404 return self ._suplabels (t , info , ** kwargs )
400405
406+ def get_supxlabel (self ):
407+ """Return the supxlabel as string or an empty string if not set."""
408+ text_obj = self ._supxlabel
409+ return "" if text_obj is None else text_obj .get_text ()
410+
401411 @_docstring .Substitution (x0 = 0.02 , y0 = 0.5 , name = 'supylabel' , ha = 'left' ,
402412 va = 'center' , rc = 'label' )
403413 @_docstring .copy (_suplabels )
@@ -409,6 +419,11 @@ def supylabel(self, t, **kwargs):
409419 'weight' : 'figure.labelweight' }
410420 return self ._suplabels (t , info , ** kwargs )
411421
422+ def get_supylabel (self ):
423+ """Return the supylabel as string or an empty string if not set."""
424+ text_obj = self ._supylabel
425+ return "" if text_obj is None else text_obj .get_text ()
426+
412427 def get_edgecolor (self ):
413428 """Get the edge color of the Figure rectangle."""
414429 return self .patch .get_edgecolor ()
0 commit comments