Dadedidododu
Dadedidododu

Reputation: 51

.Spyder opens a figure instead of absence of plt.show()

I actually know a problem in Spyder. When I Work with matplotlib.pyplot, it automatically shows the figure without any kind of plt.show(). So when I make many different figures, it always shows them all on the same. I've recently made a program, which is saving one figure by iteration in an for loop, it also opens a figure and at the end, the loop crashes before ending because of too many figures showed. I would like to know if someone also knows such problems, because I've encountered the in many computers running spyder

Upvotes: 0

Views: 822

Answers (1)

Matthew
Matthew

Reputation: 658

You likely are running in iPython with Spyder. iPython automatically runs plt.show(). Press f6 (default), and see if "execute in current python or iPython console" is selected. If so, check the console, the 'tab' should show a blue icon with "iP" and have 'kernal' (or similar) following it.

Simple fix: switch to "execute in dedicated python console" or open a new python console (tab header "python 1")

Source: had same problem.

Upvotes: 1

Related Questions