Matplotlib绘图窗口出现在不同的桌面上 [英] Matplotlib plot window appears on different desktop

查看:278
本文介绍了Matplotlib绘图窗口出现在不同的桌面上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在带有matplotlib 1.1.1的Mac 10.8上运行Python 2.7.2.我正在使用的后端是MacOSX.如果我运行任何绘图代码,例如

I am running Python 2.7.2 on Mac 10.8 with matplotlib 1.1.1. The backend I am using is MacOSX. If I run any plotting code e.g.

import matplotlib.pyplot as plt
plt.plot([1,2,3], [4,5,6])
plt.show()

绘图窗口始终出现在与我正在使用的桌面不同的桌面上.如果我使用ipython或运行脚本,则此行为是相同的.有没有解决的办法?每次不得不去寻找情节是很烦人的!

the plot window always appears on a different desktop from the one I am working on. This behaviour is the same if I use ipython or if I run a script. Is there a way around this? It's annoying to have to go and hunt for the plot each time!

推荐答案

如果您以前使用OSX的桌面管理命令将其移动,则可以通过以下方式对其进行修复:

If you previously moved it with OSX's desktop management commands you can fix it like this:

在Dock中的Matplotlib图标的Python图标上单击鼠标右键(单击命令).在选项下,有一些选项可将应用程序"分配给桌面.设置为无.如果它仍在另一个桌面上打开,请将其移至所需的桌面上(一种方法是单击并按住窗口的标题,然后按Ctrl-#,其中#是所需的桌面)

Right click (Command click) on the Python Icon of the Matplotlib Icon in the Dock. Under Options there are options to assign the "application" to Desktops. Set to none. If it still opens in another desktop, move it to desktop you want it on (one way is to click and hold the header of the window... press Ctrl-#, where # is the desktop you want it on)

这篇关于Matplotlib绘图窗口出现在不同的桌面上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆