What are the advantages/disadvantages of QCustomPlot, compared to Qwt?

后端 未结 4 1817
感情败类
感情败类 2020-12-08 11:44

I am using Qwt now for two years. I like its object oriented classes, which makes it very easy to adapt the plots and functionality. These days QCustomPlot is becoming more

4条回答
  •  鱼传尺愫
    2020-12-08 12:06

    When Plotting lots of points. and user concentrate the point to whole plot. ie (x, y axis is fully covered with pixels)

    (points count = given below calculation)

    while dragging the plot:

    • Qwt give a way lot better performance over QCustomPlot.
    • QCustomPlot drag/replotting lags way more than Qwt and that is bad for UI.
    • Qwt lag is ignorable and is acceptable.
    • Qwt require less processing.

    What i noticed is: while dragging, Qwt only drags the plot area and after dropping it draw on the area. whereas QCustomPlot try to replot before dropping. (note sure but this could help QCustomPlot guys make it better.)


    Also, Qwt provide raw buffer option that can be managed externally. i was able to decrease (QcustomPlot)150Mb to less that (Qwt)40Mb. keeping,

    QCustomPlot force user to allocate memory to X axis (errorbar+ , errorbar-), y axis (errorbar+, errorbar-) (2 * 2 * sizeof(double)) memory is wasted out of 3 * 2 * sizeof(double) ie 32byte out of 48byte is waste (for 1sample) where as only Qwt required 16byte for one sample (for x, and y).

    afai understand, errorbar can be achieved in Qwt also

    • equal number of points (96KiloSamples/sec * 10second buffering = 96 * 1000 * 10 = ~1M)
    • Anti-aliasing disable in QCustomPlot and enabled in Qwt
    • Same re-plotting algorithm. (take data at same interval of time from device and fire replot afterwards)

    even after Anti-aliased enabled, Qwt was way much better in performance.


    NOTES:

    • Qwt is mature, efficient.
    • QCustomPLot give better look and feel. (slightly better than Qwt.)

    Qwt can be made much more good looking just after changing it background to white, antialiased enabled and grids

    Tested on:

    • Qwt 6.1.0 compiled for Qt5
    • QCustomPLot 1.2.1 compiled for Qt5
    • Qt5.2.1
    • Linux localhost.localdomain 3.13.11-100.fc19.x86_64 #1 SMP Wed Apr 23 20:10:57 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
    • i3-3120M CPU @ 2.50GHz x 4

    also, QCustomPlot peform same on Qt4.

    these are my finding, and may vary from conditions to conditions.

    i have switch back to Qwt. hope this help others in selecting. :)


    minor:

    • Con QCustomPLot require seperate qmake file to be downloaded. (frustrating for starters)
    • Con Qwt has multiple file to be compiled.
    • Pro QCUstomPlot has only two files : source and header
    • Con Neither channel have IRC channel (atleast not on Freenode)
    • Con QCustomPlot has multiple example pushed into one executable.
    • Pro Qwt has many examples distributed over many executables
    • Con QCustomPlot dont have any QtCreator Plugin
    • Con QCustomPlot is not available in repo (atleast not on Fedora 19)
    • Pro Qwt has lot of other goodies
    • Con Qwt is bulky :p
    • Pro Qwt support CMake
    • Pro Qwt is much more flexible (afaif)

    please correct me if im wrong on some points.

提交回复
热议问题