Hi Patrick, thanks, that was already helpful.
You are right that the call to app.exec_() was missing for a proper display. And with that, indeed, I can execute the export from the gui. My boilerplate for exporting was http://www.pyqtgraph.org/documentation/exporting.html and so I thought I could work without the app.exec_(). So perhaps you know what I have to pass as a proper plotItem instance? Thanks in advance! On Tuesday, 11 September 2018 04:29:39 UTC+2, Patrick wrote: > > Hi, > I'm pretty sure you can do this (update plot and export, without plot > being updated on screen), but I think the plot axes still needs to be > displayed somewhere initially so that the mapping from plot to device > coordinates gets set up. Maybe there's a way to do that without showing the > plot window, but I don't know. > > In your example code you never call app.exec_(), so the Qt event loop > never starts, so none of the required initialisation happens. If you run a > normal app with the window displayed, then trigger the export from a > button/timer/event etc, then it should work. > > As an aside, I use pyqtgraph to plot inside my applications due to fast > screen updates and interactivity, but produce output plot files with > matplotlib (as pdf or png). So when the user hits the "save" button, I pass > the data off to a separate matplotlib plotting method as it has prettier > and more flexible plotting options. For performance, you can keep the > matplotlib figure around and just modify the plot data with set_data > methods rather than recreating the whole plot again. If that still isn't > fast enough, then maybe store raw data and analyse/plot afterwards. > > On Tuesday, 11 September 2018 01:53:07 UTC+9:30, GR wrote: >> >> Hi, >> >> I posted a question on stackoverflow: >> >> >> https://stackoverflow.com/questions/52250075/how-does-a-pyqtgraph-export-for-three-subplots-look-like >> >> I am unsure about how much attention it would rise there. Therefore I >> would like to draw your attention to that question. >> >> I hope you do not mind. >> >> If you have an idea how my question can be solved: thanks in advance! >> >> Gerhard >> >> -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/a6b60d55-326b-49e3-9b24-63461a2b0848%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
