Taurus plotting guide

TL;DR: Use taurus_pyqtgraph

In taurus, the following dependencies are used for its various plotting widgets:

  • PyQwt5: for the TaurusPlot and TaurusTrend implemented in taurus.qt.qtgui.qwt5 (former taurus.qt.qtgui.plot). PyQwt5 is unmaintained, removed from debian10, and only works with py2+Qt4, so it needs to be replaced urgently. DO NOT BASE ANY NEW DEVELOPMENT ON THIS

  • guiqwt: for TaurusImageDialog and TaurusTrend2DDialog implemented in taurus.qt.qtgui.extra_guiqwt. It does not depend at all of PyQwt5, and supports py2, py3 and Qt4, Qt5 so replacing it is not urgent (but still it should be eventually replaced by pyqtgraph-based widgets)

  • pyqtgraph: for TaurusPlot and TaurusTrend implementions in taurus.qt.qtgui.qtgui.tpg provided by the taurus_pyqtgraph plugin. It supports py2, py3 and Qt4, Qt5 and is the intended replacement for all taurus plotting widgets (TEP17).

Even if the TEP17 is not yet accepted, in practice the taurus_pyqtgraph widgets are the best (in some cases the only) option for new developments involving plotting.

A lot of features are already implemented in taurus_pyqtgraph and some features are already better than in the PyQwt5 implementations.

Still, some features available in the old PyQwt5-based implementations of TaurusPlot and TaurusTrend are still missing in the pyqtgraph-based implementations (any help with this is welcome). The main ones are:

  • persistence of user changes related to models (but this is not needed for use cases where the models are set programmatically and not altered by the user)

  • full support of tango archiving in TaurusTrend (but basic support already available with the taurus_tangoarchiving plugin)

  • maturity (certainly these classes are less tested than the qwt5 ones!)

Tips for Getting started with taurus_pyqtgraph

  1. install the plugin (the module will be installed as taurus_pyqtgraph and at the same time will be available as taurus.qt.qtgui.tpg)

  2. The philosophy is that you should use tpg as an extension to regular pyqtgraph widgets. Therefore you should read the official pyqtgraph docs , and also run the official demo with python -m pyqtgraph.examples

  3. taurus_pyqtgraph also has some examples. Have a look at them. Also have a look at the __main__ sections of the files in the taurus_pyqtgraph module

  4. See this tutorial.