Exporting of the Image file is out of size!

38 views
Skip to first unread message

aksha...@effectphotonics.nl

unread,
Aug 5, 2016, 7:35:25 AM8/5/16
to pyqtgraph
Hi,

I am creating a GraphicsLayoutWidget and then using addPlot() to add plots to the widget. This widget is not displayed on the screen but used to export image by using:

        exporter = pyqtgraph.exporters.ImageExporter(pwidget.scene())
        exporter.export(os.path.join(datadirtemp, str(typename) + '.png'))

But the images are never covering the whole plot.

Also, using the below item does not help:
       exporter.parameters()['width'] = pwidget.scene().sceneRect().width()

pwidget.scene() has correct dimensions but pwidget doesnot.

john lunzer

unread,
Aug 30, 2016, 8:40:12 AM8/30/16
to pyqtgraph
I also have this problem. But the issue seems to go much deeper. By default all of my QWidgets get a size or sizeHint of of 640x480. Even if the first thing I do is set QMainWindow size before adding anything to the window the QWidgets are the same default size. I've tried to travel down the rabbit hole and I've tried every setGeometry(), setSize(), setSizeHint() I could find with no change. 

There has to be a secret size keyhole somewhere...
Reply all
Reply to author
Forward
0 new messages