If you like to use qt4 as backend, you can also do it like this:

import sys
from PySide import QtGui
import numpy as np
from matplotlib.figure import Figure

from matplotlib.backends.backend_qt4agg \
import FigureCanvasQTAgg as FigureCanvas

fig = Figure()
axes = fig.add_subplot(111)
x = np.arange(0.0, 3.0, 0.01)
y = np.cos(2*np.pi*x)
axes.plot(x, y)

# show plot in Qt FigureCanvas
qApp = QtGui.QApplication(sys.argv)
fc=FigureCanvas(fig)
fc.setGeometry(2000, 100, 500, 500)
fc.show()

# a second plot
fc1=FigureCanvas(fig)
fc1.setGeometry(500, 100, 500, 500)
fc1.show()

sys.exit(qApp.exec_())


This works for me on windows with two screens.

Juergen


Am 03.10.2012 20:26, schrieb Gökhan Sever:
> I was after a similar issue once, and asked this question at SO:
>
> http://stackoverflow.com/questions/7802366/matplotlib-window-layout-questions
>
> Manual positioning is fine sometimes if I want to really place windows
> side-by-side for comparison purposes. However it would be nicer if mpl were
> to remember positions of figures so that it would place the new figures
> exactly the same place where they were before closed.
>
> Actually, I have similar complaint for other windows opened in my Fedora 16
> (Gnome 3.2) system. Say for instance I start a gvim instance, then move its
> window to my second monitor, but closing and re-opening it, the window's
> position is restored to the first monitor. Same thing is for evince,
> sometimes it opens pdf's on the first monitor, sometimes on the second,
> randomly position at least for my observation. I don't know where to look
> for a solution; in each specific program, or windows manager should handle
> / remember positions of windows on screens.
>
> On Tue, Oct 2, 2012 at 9:38 PM, Jianbao Tao <jianbao....@gmail.com> wrote:
>
>> Hi,
>>
>> Is it possible to specify the position of a figure window when one is
>> created? This will be a killing feature if one wants to put the figure
>> window at the right place in the screen automatically. It is annoying if
>> ones has to drag a new figure to a comfortable place in the screen every
>> time a new figure is created.
>>
>> Jianbao
>>
>>
>> ------------------------------------------------------------------------------
>> Don't let slow site performance ruin your business. Deploy New Relic APM
>> Deploy New Relic app performance management and know exactly
>> what is happening inside your Ruby, Python, PHP, Java, and .NET app
>> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
>> http://p.sf.net/sfu/newrelic-dev2dev
>> _______________________________________________
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>
>
>
>
> ------------------------------------------------------------------------------
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to