9

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()
2
  • 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. Nov 20, 2017 at 20:14
  • 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
    Nov 22, 2017 at 0:21

1 Answer 1

12

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.