prevent plot from showing in jupyter notebook

Perhaps just clear the axis, for example:

fig= plt.figure()
plt.plot(range(10))
fig.savefig("save_file_name.pdf")
plt.close()

will not plot the output in inline mode. I can’t work out if is really clearing the data though.

Leave a Comment