.. _sphx_glr_gallery_scene_realtime_data:
Realtime Data Tutorial
======================
Examples that progressively build a Qt-based visualization application
with updating data. The data in this tutorial is artificial, but is created
and used in a way resembling real world data streams. In early examples data
is created in the main GUI thread, but creation is later moved to an external
thread to promote better responsiveness from the GUI.
Each example is a self-contained working application in some sense and can be
used as a reference for the particular feature it is demonstrating. However,
each example builds on the example before it so features and
vispy application best practices are improved at the cost of more complex code.
Lastly, these examples use PySide2, but the application
structure and demonstrated concepts should apply and be transferable to other
backends (especially the Qt ones) with only a few exceptions. At the time of
writing PySide2 is the newest version of PySide available through conda-forge
conda channels. If/when PySide6 is available, pull requests to update these
examples would be welcome. ;)
.. raw:: html
.. raw:: html
.. only:: html
.. image:: /gallery/scene/realtime_data/images/thumb/sphx_glr_ex01_embedded_vispy_thumb.png
:alt:
:ref:`sphx_glr_gallery_scene_realtime_data_ex01_embedded_vispy.py`
.. raw:: html
Embed VisPy into Qt
.. raw:: html
.. only:: html
.. image:: /gallery/scene/realtime_data/images/thumb/sphx_glr_ex02_control_vispy_from_qt_thumb.png
:alt:
:ref:`sphx_glr_gallery_scene_realtime_data_ex02_control_vispy_from_qt.py`
.. raw:: html
Control VisPy from Qt
.. raw:: html
.. only:: html
.. image:: /gallery/scene/realtime_data/images/thumb/sphx_glr_ex03a_data_sources_timer_thumb.gif
:alt:
:ref:`sphx_glr_gallery_scene_realtime_data_ex03a_data_sources_timer.py`
.. raw:: html
Update data using timer-based events
.. raw:: html
.. only:: html
.. image:: /gallery/scene/realtime_data/images/thumb/sphx_glr_ex03b_data_sources_threaded_loop_thumb.gif
:alt:
:ref:`sphx_glr_gallery_scene_realtime_data_ex03b_data_sources_threaded_loop.py`
.. raw:: html
Update data using a loop in a background thread
.. raw:: html
.. only:: html
.. image:: /gallery/scene/realtime_data/images/thumb/sphx_glr_ex03c_data_sources_threaded_events_thumb.gif
:alt:
:ref:`sphx_glr_gallery_scene_realtime_data_ex03c_data_sources_threaded_events.py`
.. raw:: html
Update data using timer events in a background thread
.. raw:: html
.. toctree::
:hidden:
/gallery/scene/realtime_data/ex01_embedded_vispy
/gallery/scene/realtime_data/ex02_control_vispy_from_qt
/gallery/scene/realtime_data/ex03a_data_sources_timer
/gallery/scene/realtime_data/ex03b_data_sources_threaded_loop
/gallery/scene/realtime_data/ex03c_data_sources_threaded_events