Hello,
I am currently using PyQtPlot as part of a project I'm working on that needs to plot touchpad data onto the screen. Essentially it records the events being emitted by a touchpad and then draws points at each place the finger was reported and connects them with lines. The library is working great, and is fast enough to do this mostly live, but when the gesture is done my, program saves a .png of the resulting plot to disk.
The problem I'm running into is that the saved .png's don't look like the live view. In the saved .png images the dots as scaled wrong and offset from the lines. The lines actually look just fine, the only problem is the dots are out of place. I'm not sure if this is something I'm doing wrong or if it's a bug. Has anyone run into this problem as well?
I've attached a screenshot of the live-view where everything is normal (screenshot.png) as well as one of the saved plots that corresponds with the screenshot showing the misplaced symbols (plot.png).
The salient points of how the code works is that the lines are drawn using setData()
- plot.setData(x=xs, y=ys, pen=self.pens_by_tid[tid], symbol='o', symbolSize=ps, symbolPen=self.pens_by_tid[tid], symbolBrush=None)
And the image is saved using ImageExporter
- exporter = pg.exporters.ImageExporter(self.plot_window.plotItem)
- exporter.parameters()['width'] = TouchPlotter.EXPORT_IMAGE_WIDTH
- exporter.export(tmp_filename)
Thanks for any help on this
-Charlie