Intro
Pyqtgraph's choice of a dark background for plots has generated mixed reactions among taurus users.
Changing it to a light background has been a common request, but the decision has always been postponed because of lack of time and its not-so-obvious implications.
But it may be good to do some discussion about it now in order to take decision.
Note: pyqtgraph plot widgets allow calling .setBackgroundBrush() individually, but pyqtgraph as a whole provides a global switch mechanism.
Arguments for each option
Apart of purely aesthetic preferences (there is people who prefers dark themes and others who prefer light ones), here are some arguments for each option:
Arguments in favor of changing background to a light color:
- It makes the curves easier to see (but whether this is intrinsic or it can be managed with a change in the colors for the curves palette, is not clear to me)
- It is more similar to the qwt5-based plots that we are replacing (less change stress on the users, smoother transition)
- It matches better the default desktop theme in KDE (which is light)
Arguments in favor of keeping the original dark background :
- It is less work: changing the colors is easy, but providing configurability that covers all use cases may be difficult (see next section)
- Concerns that "going against upstream" will result in more maintenance work and possibly require more tweaks by end users (e.g. it is possible that some design decisions assume that colors are the default dark ones, and we or the final user will need to do extra work to fix issues that would not be apparent if we used the default)
- It maintains visual consistency with pure-pyqtgraph widgets. Note that a design goal of taurus_pyqtgraph is to encourage the use of pure pyqtgraph widgets and APIs and minimize the amount of taurus-specific knowledge needed to use it. Nevertheless, if we use the global switch mechanism for changing the colors at pyqtgraph level, all pyqtgraph-based widgets in the same application would be affected
Configurability
Whichever the decision, should we provide a simple "switch" mechanism?
And if so, which scope should this mechanism act onto (a global configuration, at the widget / tool level, ...)?
And should the mechanism be used implicitly (e.g. set the colors when importing taurus_pyqtgraph) or explicitly (e.g. a function that you need to call in all your guis).
Note that an implicit and global change may seem convenient but will probably upset GUIs which mix pure pyqtgraph widgets with taurus_pyqtgraph ones.
Intro
Pyqtgraph's choice of a dark background for plots has generated mixed reactions among taurus users.
Changing it to a light background has been a common request, but the decision has always been postponed because of lack of time and its not-so-obvious implications.
But it may be good to do some discussion about it now in order to take decision.
Note: pyqtgraph plot widgets allow calling
.setBackgroundBrush()individually, but pyqtgraph as a whole provides a global switch mechanism.Arguments for each option
Apart of purely aesthetic preferences (there is people who prefers dark themes and others who prefer light ones), here are some arguments for each option:
Arguments in favor of changing background to a light color:
Arguments in favor of keeping the original dark background :
Configurability
Whichever the decision, should we provide a simple "switch" mechanism?
And if so, which scope should this mechanism act onto (a global configuration, at the widget / tool level, ...)?
And should the mechanism be used implicitly (e.g. set the colors when importing
taurus_pyqtgraph) or explicitly (e.g. a function that you need to call in all your guis).Note that an implicit and global change may seem convenient but will probably upset GUIs which mix pure pyqtgraph widgets with taurus_pyqtgraph ones.