With the MacOSX backend there is no way to set the window position of a matplotlib window. However under MacOSX generally speaking you can use other matplotlib backends which allow for this. The TkAgg
backend (using Tcl/Tk
via the Tkinter binding in the Python standard library) should be installed automatically.
In your python script, before anything else, switch to this backend, then create your plot, show it and now you can move the window with
get_current_fig_manager().window.wm_geometry("+<x-pos>+<y-pos>")
Here a working example:
import matplotlib
matplotlib.use("TkAgg") # set the backend
import matplotlib.pyplot as plt
plt.figure()
plt.plot([0,1,2,0,1,2]) # draw something
plt.show(block=False)
plt.get_current_fig_manager().window.wm_geometry("+600+400") # move the window
If you install the IMHO nicer Qt4 GUI framework with the PyQt bindings, then you position the window with
get_current_fig_manager().window.setGeometry(<x-pos>,<x-pos>,<width>,<height>)
Again the full example:
import matplotlib
matplotlib.use("Qt4Agg") # set the backend
import matplotlib.pyplot as plt
plt.figure()
plt.plot([0,1,2,0,1,2]) # draw something
plt.show(block=False)
plt.get_current_fig_manager().window.setGeometry(600,400,1000,800)