Get the title of a given figure

后端 未结 3 1146
梦如初夏
梦如初夏 2020-12-20 19:32

I have created a figure and have attached to it a title like this:

def func():
    fig = plt.figure()
    fig.suptitle(\"my title\")
    return fig
         


        
3条回答
  •  青春惊慌失措
    2020-12-20 20:11

    There seems to be no public API to access this. But with some cautions you could use the non-public / potentially instable members:

    fig._suptitle.get_text()
    

提交回复
热议问题