Model/View Charting/Graphing



  • I have used a number of Qt Charting libraries like QWT and QCustomPlot but finding them limited since they can't be easily used for graphing large data. In my thesis, I stored my data in a QSqlDatabase and I need to view them in a graph for analysis. The problem with the existing libraries was that they cant be used to graph my data, reaching 10,000 points or more. Are there libraries existing that acts "more like" a Model/View that can graph large data (possibly with a scrollbar to show only part of the "BIG" graph interactively)?



  • As far as I know, those two are the most comprehensive free libraries available. I don't think any Qt specific alternatives currently exist...at least none that I am aware of.



  • Hi,

    you could have a look at KDABs charting:

    http://www.kdab.com/kdab-products/kd-chart/

    But AFAIK, it is commercial...



  • KDABs solution is dual licenced: GPL and commercial, though they don't advertise the GPL one all that clearly.



  • I knew KDAB is a comprehensive library as recommended by other devs ever since I started looking for a charting library. But I need it to be free (I can't afford non-free libs since I am still a student).

    A year ago I started using QWT for an "infamous" inter-university/national competition on "innovation", you know, hardware-software stuff.

    Right now I shifted to QCustomPlot since I find it easier to use and lighter than the former, for real-time graphing. What it lacks now is viewing a large scrollable graph of a very large data (non-real-time). My remedy right now is importing the data into .CSV file and graphing it using M$ excel.



  • As Andre said, KD Chart is also available with GPL, which means free. You on ly have to also make your stuff GPL:



  • Speaking about Qwt: curves with 10000 points are absolutely nothing uncommon. I don't see where you got the impression, that there is a limitation for you. Basically technical plots is something where Qwt has its strengths compared to most other plot packages that focus more or less on business charts.

    Note that Qwt is more a framework like QGraphicsView and usually it can be tailored to specific use cases. When users report about performance issues it is almost always because of "suboptimal" using the library in application code.

    If you are interested in more details better ask on the Qwt support channels - I only randomly listen here.



  • I agree, Qwt does offer some very nice things, but it's documentation could really use some improvement, especially at the conceptual level. I at least find it difficult to work with.



  • [quote author="uwer" date="1359984667"]If you are interested in more details better ask on the Qwt support channels - I only randomly listen here.
    [/quote]

    Yeah thanks.

    [quote author="Andre" date="1359984886"]I agree, Qwt does offer some very nice things, but it's documentation could really use some improvement, especially at the conceptual level. I at least find it difficult to work with.[/quote]

    That is one of the problems I encountered when using Qwt. To use it effectively, you need to read most of the examples and try to figure out which ones are the things you need. The doxygen documentation exists but I think it is not enough. Sample usage with explanation always comes in handy.



  • Nobody disagrees that a documentation about the basic concepts of Qwt is missing - feel free to fill this gap.

    But it is absolutely not difficult to implement a common use case like displaying a curve with 10000 points effectively - it is more that a developer needs some energy to to make it slow.



  • (my emphasis:)
    [quote author="uwer" date="1359990289"][...] it is more that a developer needs some energy to to make it slow.[/quote]

    Was that just a funny typo, or did you actually mean that?



  • It's meant like that the default settings usually give you good results :-)

    F.e the refreshtest example displays a curve of 10000 points with 55 fps ( here quadcore, but slow raster graphic + debug mode ). It repaints the plot each time from scratch - what should be the worst case.

    The oscilloscope demo instead shows a more tricky way of painting and runs with almost no CPU load even on weak systems. I had it even running with refresh rates of several times per second on the Pi with about 20-30% CPU load only.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.