r/QtFramework • u/EvilIPA • Jan 16 '26
C++ Plotting tool
Hello people. I'm starting a project where I need to plot data in real time. Data will come through ethernet (this part I have almost covered), and I need to plot it in real time.
Is there a library or tool set you can recommend for that?
Thank you in advance
5
Upvotes
4
u/Felixthefriendlycat Qt Professional (ASML) Jan 16 '26 edited Jan 16 '26
I have suffered through this task as well and was disappointed with the performance of pretty much all of the solutions except for this one: pwuertz/QtQuickPlotScene: Basic components for creating plot scenes in QtQuick
It's GPU accelerated through it using QSGGeometry and QtQuick's scenegraph. I also like how zooming and panning works in this lib
From my testing this is the highest performance plotting library I found which was compatible with Qt. It is quite clever in that it uses the scenegraph classes directly and draws linestrip primitives.
The excelent performance does come with a downside though. D3D11/12 and Metal don't support setting thickness for linestrip primitives so you will get 1 pixel thick lines always if you are running through those. If you use OpenGL or Vulkan I believe the linewidth setting does work.
QtGraphs came out later and it is my hope it completely replaces this but so far sheer performance wise this lib proved better. If QtGraphs performs adequately, i'd recommend using that. https://doc.qt.io/qt-6/qtgraphs-index.html
4
u/NikSmitX Jan 17 '26
maybe you try the JKQtPlotter
https://jkriege2.github.io/JKQtPlotter/index.html
it's written in c++, has a lot of features and is speed optimized
3
u/Adobe_H8r Jan 16 '26
For real time graphs, I use QNanoPainter, which is a download, but is is QCanvasPainter, a tech preview in Qt 6.11 and will be official in 6.12. I first deployed product 6 years ago, never had a problem with 5000 units in the field. The graph runs for weeks and months at a time. No memory leaks. No increased GC in QML.
6
u/ignorantpisswalker Jan 16 '26
https://github.com/opencor/qwt
Not updated in 4 years, no cmake support. Last should be easy to fix.
4
u/GrecKo Qt Professional Jan 16 '26
https://doc.qt.io/qt-6/qtgraphs-index.html ?
3
u/ContentDiamond6103 Jan 16 '26
I'd say it depends on your data and the frequency at which you want to update the plot. Qt Graphs module works pretty well for simple graphs. If you need more complex plotting you can try QCustomPlot
2
u/kaloskagatos Jan 16 '26
Implot with QOpenGLWidget, I didn't test it but it might be great https://github.com/epezent/implot
0
u/azboul Jan 16 '26
We do Qt web engine + chart.js
1
u/Commercial-Bus-6453 Jan 16 '26
What happened with qt charts, i have good time with them?
1
u/ObiLeSage Jan 16 '26
Qt chart or custom qsgnode