0

I am using the following functions in order...

 - plt.figure()
 - plt.plot()
 - plt.ylim 
 - plt.xticks() 
 - figure = plt.gcf() 
 - figure.set_size_inches()
 - plt.savefig()

I just want to save the figure as png, which I've been doing successfully. But the GUI keeps showing up and I am going to generate a bunch of graphs in one script, I don't want the GUI popping up every time one is created and slow my run time.

Does anyone know why it is showing up still?

anyryg
  • 313
  • 2
  • 13

1 Answers1

0

If you are using a Jupyter Notebook, there are a number of potential solutions posted here.

To summarize, try this to disable inline output from Matplotlib:

import matplotlib as plt
plt.ioff()

Or put this at the start of a cell to prevent it from creating output:

%%capture
avi
  • 170
  • 9