I use the widget backend to embed an interactive matplotlib figure in an ipywidgets.GridBox
.
The window title takes up too much space and I want to remove it.
With plt.figure(' ')
it becomes invisible but even with fig.tight_layout()
the space is still reserved and takes up useless space in my layout.
Below is a minimal example.
import matplotlib.pyplot as plt
%matplotlib widget
plt.ioff()
fig = plt.figure('remove the title')
plt.plot([0,1],[0,1])
fig.tight_layout()
display(fig.canvas)
I found a few examples here but no complete list of backend specific options. In this related post a solution for the notebook backend is given. what is the official name of this title bar from matplotlib, how to hide it