What is the official name of this title bar from matplotlib and how do I hide it?

前端 未结 2 2077
名媛妹妹
名媛妹妹 2021-01-27 16:20

I am new to matplotlib, and I don\'t know what the name of the title bar arrowed in following image is.

Title bar

I googled and dug from matplotlib official docu

2条回答
  •  悲哀的现实
    2021-01-27 17:16

    What you refer to as "title bar", is actually part of the notebook backend - essentially the code that translates what you write in python to something that can be visualised as a figure. The notebook backend is made to be interactive within Jupyter notebooks, and as such has that bar, plus buttons you can use to pan, zoom, etc. When you save the figure via plt.savefig() or by clicking the save button, the bar will not appear.

    If you want to get rid of the interactivity all together, try using the %matplotlib inline magic instead - that will select the inline backend, and remove the interactivity.

提交回复
热议问题