Hi, sorry I just realized you didn't get a response here.  I haven't used
matlab in quite some time, and even when I did use it, I wasn't
particularly proficient with it, so I'm not going to be of much use in
providing analogous functionality, but I can certainly help w/ some
guidance on how to update plots in pyqtgraph.

Most of pyqtgraph's plot objects have a setData
<https://pyqtgraph.readthedocs.io/en/latest/graphicsItems/plotdataitem.html#pyqtgraph.PlotDataItem.setData>
method intended to be called with new data to update an existing plot
with.  The easiest way to update a plot would be to use a signal/slot
mechanism where new data is emitted with a signal and where the setData
method is treated as the slot that receives the new data.  This should
update the plot accordingly.

Sometimes when we want a plot updating at a fixed interval (or as quickly
as possible), you can use a QTimer <https://doc.qt.io/qt-6/qtimer.html>.
We use QTimer's throughout our examples, you can see a use-case here:
https://github.com/pyqtgraph/pyqtgraph/blob/master/pyqtgraph/examples/PlotSpeedTest.py

I haven't ever used os.system("pause") before, and I would think this is
likely not the method you actually want to use in your case.

On Tue, Aug 16, 2022 at 8:20 AM Valentina Colmenarez <[email protected]>
wrote:

>   Hi! I have a question, regarding an update I need to do on a chart.
>
> I need to update the information of the chart on a secondary window when
> pressing any key.  For that I'm using the "os.system("pause")" method,
> which I understand is like the "pause()" method in Matlab. However, the
> "os.system("pause")" disables the main window of my program. Is there any
> another method I can use to help me with the current update I need to do?.
>
> Thank you in advance.
>
> --
> 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/9dc1f5dc-d4a3-4df6-bb35-be8d2a47598bn%40googlegroups.com
> <https://groups.google.com/d/msgid/pyqtgraph/9dc1f5dc-d4a3-4df6-bb35-be8d2a47598bn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CA%2BnduTF7MxOWZR4qztufd%2B2%2B7-Cv_E-9syhik-P-ro01qrCYDA%40mail.gmail.com.

Reply via email to