在Spyder中如果设置了Inline的图像显示方式,图像会在console中显示且无法通过GUI toolkit对绘制的三维图像进行拖动旋转。
解决方法有:
- Preferences > IPython Console > Graphics > Backend: Automatic或Qt5
- 输入魔法命令:
%matplotlib qt5
如果是在Jupyter Notebook中想要实现新窗口显示图像则将GUI toolkit设置为notebook,代码如下:
%matplotlib notebook