j***@polytechnique.edu
2018-12-06 15:08:34 UTC
Hi
I use a graphicsLayoutWidget to plot an image from a camera. But i want to
remove the 2 black border around and to full fill the widget.
Does somebody know how to do it?
My program is :
self.winImage = pg.GraphicsLayoutWidget(border=(100,100,1))
self.winImage.setAspectLocked(True)
self.winImage.setContentsMargins(1,1,1,1)
vbox2=QVBoxLayout()
vbox2.addWidget(self.winImage)
vbox2.setContentsMargins(0,0,0,0)
self.p1=self.winImage.addPlot()
self.imh=pg.ImageItem(border='w')
self.p1.addItem(self.imh)
self.p1.setMouseEnabled(x=False,y=False)
self.p1.setContentsMargins(1,1,1,1)
self.p1.setAspectLocked(True,ratio=1)
self.p1.setContentsMargins(0,0,0,0)
hMainLayout=QHBoxLayout()
hMainLayout.addLayout(vbox2)
hMainLayout.addLayout(vbox1)
hMainLayout.setContentsMargins(0,0,0,0)
hMainLayout.setStretch(2,1)
self.setLayout(hMainLayout)
self.setContentsMargins(1,1,1,1)
I use a graphicsLayoutWidget to plot an image from a camera. But i want to
remove the 2 black border around and to full fill the widget.
Does somebody know how to do it?
My program is :
self.winImage = pg.GraphicsLayoutWidget(border=(100,100,1))
self.winImage.setAspectLocked(True)
self.winImage.setContentsMargins(1,1,1,1)
vbox2=QVBoxLayout()
vbox2.addWidget(self.winImage)
vbox2.setContentsMargins(0,0,0,0)
self.p1=self.winImage.addPlot()
self.imh=pg.ImageItem(border='w')
self.p1.addItem(self.imh)
self.p1.setMouseEnabled(x=False,y=False)
self.p1.setContentsMargins(1,1,1,1)
self.p1.setAspectLocked(True,ratio=1)
self.p1.setContentsMargins(0,0,0,0)
hMainLayout=QHBoxLayout()
hMainLayout.addLayout(vbox2)
hMainLayout.addLayout(vbox1)
hMainLayout.setContentsMargins(0,0,0,0)
hMainLayout.setStretch(2,1)
self.setLayout(hMainLayout)
self.setContentsMargins(1,1,1,1)
--
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/b59f331a-5db3-4d1c-983f-3c666212ec57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/b59f331a-5db3-4d1c-983f-3c666212ec57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.