pyqtgraph window position
Poul Riis
priisdk at gmail.com
Sat Feb 14 10:08:43 EST 2015
Den lørdag den 14. februar 2015 kl. 06.59.20 UTC+1 skrev Cousin Stanley:
> > I can control the size of my pyqtgraph window below with 'resize'.
> >
> > But how can I control the position on the screen?
> > ....
>
> Also, try ....
>
> w.setGeometry( x_pos , y_pos , width , height )
>
>
> --
> Stanley C. Kitching
> Human Being
> Phoenix, Arizona
Thanks a lot.
And how can I control the position of the secondary window in the example below?
And how can I make a keyboard interrupt?
Poul Riis
import pyqtgraph as pg
from math import *
from time import *
import numpy as np
win = pg.GraphicsWindow(title="Basic plotting examples")
#win.resize(1000,600)
win.setGeometry(0,100, 1000,600 )
xx=[]
yy=[]
datanp = np.random.normal(size=(10,20))
ptr=0
for i in range(0,25):
xx.append(i)
yy.append(i*i/25.0)
xarray=np.array(xx)
pw=pg.plot(xx,yy,pen='r')
p1 = win.addPlot(title="Extra window")
p1.plot(xx,yy,pen='b')
j=0
while True:
j=j+1
yyy=[]
for ii in range(0,len(yy)):
yyy.append(sin(pi*(j-ii)/25)*yy[ii])
yarray=np.array(yyy)
pw.plot(xarray, yarray, clear=True)
pg.QtGui.QApplication.processEvents()
More information about the Python-list
mailing list