This is one of the things were InlineBackend have to behave differently from other backend or you would have sort of a memory leak. You have to keep explicit handle to matplotlib figure and/or set close_figure
to False
in config. Usually pyplot
is a compatibility layer for matlab for convenience, try to learn to do using the Object Oriented way.
fig,ax = subplots()
ax.plot(range(4))
ax.set_ylabel('my label')
...