从IPython您可以执行以下操作:
figure()
get_current_fig_manager().window.wm_geometry("400x600+20+40")
Run Code Online (Sandbox Code Playgroud)
或者等效于Python脚本:
import pylab as pl
pl.figure()
pl.get_current_fig_manager().window.wm_geometry("400x600+20+40")
pl.show()
Run Code Online (Sandbox Code Playgroud)
请注意,这假设您使用的是TkAgg后端.