7
votes

Several existing posts address this question, but none of the solutions worked for me.

I am using Spyder 3.2.4 with Python 3.6. I'd like plots to show up in a new window instead of as tiny in-line figures in the IPython console.

I tried Tools > Preferences > IPython console > Graphics > Graphics backend > Automatic. I also tried Qt5 and Qt4 here, and closed and reopened the file I was trying to run (see code below).

I also tried

 matplotlib qt 

directly in the console, with no result.

I checked whether the windows might be popping up in the background, but they are not.

Any ideas?

Code:

import numpy as np
import matplotlib.pyplot as plt

x = np.arange(10)
y = x**2

plt.ion()   
plt.plot(x,y)
plt.show()
1
After changing the spyder preferences you need to restart Spyder. Also for me the only option working is actually "tkinter". When using qt Spyder crashes (probably some bug). In order to show plots with the qt backend, one may however run the scripts "in a new dedicated python console", instead of IPython. - ImportanceOfBeingErnest
I did actually try restarting Spyder as well, with no luck. Spyder doesn't crash with qt, but it also doesn't pop out the plots. - Takver

1 Answers

10
votes

Go to Tools > preferences > IPython console > Graphics > Graphics backend > Backend: Automatic After this don't forget to restart the kernel, you can do that by clicking on setting button on the top right corner of the console.If this still doesn't work for you, try typing %matplotlib auto in the console.