lucabaldini / xpedaq

Data acquisition software for the X-ray polarimetry explorers
GNU General Public License v2.0
0 stars 0 forks source link

Decide the plotting tool we want to use for the DAQ #17

Closed lucabaldini closed 7 years ago

lucabaldini commented 8 years ago

We have some experience with Qwt (in the python flavor) http://qwt.sourceforge.net/ but this would add yet another dependency.

Looking around, this seems like a nice-looking alternative http://www.qcustomplot.com/ (again, it is another dependency, but it seems relatively lightweight).

QtCharts would seem like the obvious choice http://doc.qt.io/QtCharts/ but it's not quite clear to me whether it's available in Qt4 or requires moving to Qt5.

lucabaldini commented 8 years ago

I suspect QtCharts would require moving to Qt5, unfortunately.

lucabaldini commented 8 years ago

Gloria is suggesting this additional option, which seems like a good one http://mathgl.sourceforge.net/doc_en/Main.html

It provides an interface to both Qt and OpenGL, and this might be handy if we want to migrate to OpenGL altogether in the future.

bregeon commented 8 years ago

You could try matplotlib as well :o) http://blog.rcnelson.com/building-a-matplotlib-gui-with-qt-designer-part-1/

albertomanfreda commented 8 years ago

After some researching on the internet and a few tests made on my laptop, it seems to me that level of support mathgl receive, either from the creator and from the community (which appears to be quite small btw), is largely insufficient for our needs. I suggest avoiding this tool.

I am now giving a look at http://www.qcustomplot.com/ i.e. trying to compile and produce some test plots.

lucabaldini commented 8 years ago

We now seem to be able to compile and run with Qt5, see issue #62

Maybe it's worth to look into what Qt5 is offering in terms of plotting? The advantage is that we would not be adding yet another dependency.

albertomanfreda commented 8 years ago

Strange as it may sounds, Qt Charts does not seem to offer a tool for making color map plots. I vote for qcustomplot, which offers functionality for producing all the plots typically needed and has the pro of requiring only the inclusion of two files (qcustomplot.h and qcustomplot.cpp) into the project. I have tested this library on my laptop (Ubuntu 14.10) and I was able to compile smoothly and to produce a test plot upon pressing the 'start' button in the gui of xpepeds.

albertomanfreda commented 8 years ago

Qcustomplot is now used by the monitor application (xpemon). I have realized that the histogram plotting tool it provided (QCPBars) does not feature a "real" histogram, but instead is just a way to display (key,value) pairs. However the problem has been solved by enclosing it in our own histogram class, which handle the internal data and keep things synchronized. Same goes for the 2D histogram utility (QCPColorMap). Beside this, the library seems actually really simple to use and offers nice functionalities. I would keep it.

lucabaldini commented 7 years ago

It's pretty clear we're using qcustomplot. Closing this one.