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

4

18

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 and more popular and competes with Qwt. Of course I did compare the APIs. However I am interested in the testimonies of experienced users from both libraries. What is convenient? What not? Are there any pitfalls?

Noaccount answered 25/10, 2012 at 11:17 Comment(0)
E
13

I wouldn't call myself "experienced", as I used Qwt only for a few months, and QCustomPlot for a few weeks. That being said, my impressions are:

  • QCustomPlot seems to be more actively developed at present. Last release was in August 2012 (whereas last release of Qwt dates back to 2011). Subjectively, its interface seems more 'aligned' with Qt framework.
  • Qwt, on the other hand, seems more mature and featureful. For instance, current release of QCustomPlot has no straightforward way to set the colour background for the axis rectangle (only setting background to a user-supplied pixmap is supported). Another example - Qwt has special classes and methods to facilitate plotting and zooming in-out the curves with a very large number of points. I found nothing like that in QCustomPlot.

EDIT: Author of QCustomPlot is aware of missing functionality to set plot background and promises to add it in upcoming release.

There's also another important difference between QCustomPlot and Qwt - licensing. - Qwt is LGPL, so you can link it into non-GPL project. QCustomPlot is GPL v.3, which many people (myself included) find WAY too restrictive. QCustomPlot author invites to contact him if you want LGPL license.

EDIT2 (25 March 2013): New releases of Qwt branches 5.* and 6.* appeared in November, which annuls "more actively developed" advantage of QCustomplot

Esoterica answered 2/11, 2012 at 20:17 Comment(2)
Qwt is actually licensed under the "Qwt License" which, while based on the LGPL, seems to include an advertising clause which may actually make it incompatible with the GPL.Edulcorate
In opposite to the LGPL the Qwt license also allows static linkage for closed source application. When doing so the application has to indicate somehow ( f.e. in a README ) , that it is using Qwt. In case of dynamic linkage this is not necessary - it is completely the LGPL.Matless
D
10

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.

Drus answered 11/7, 2014 at 4:3 Comment(1)
QCustomPlot can also be used with CMake. So no advantage here for QwtHayton
A
8

I can't compare both libraries since I only use QCustomPlot (for a year now) but I believe my comment may be useful to other nevertheless.

Pros of QCustomPlot:

  • Publicly availabe on Gitorious,
  • Living user base willing to help out (including the autor himself),
  • Openness to LGPL licensing (in exchange for a donation, in my case),
  • Very clean and concise interface,
  • Very easy to find a bug, if present (my bugfixes were rarely longer than one line)
  • Easy to extend;
  • Very hackable into whatever you'd like to smash out of a cartesian plotting library,
  • Good documentation,
  • Available in condensed form of 1 .h and one .cpp file - handy for quick integration or purpose-built one-widgeters,
  • Very good performance (in all of my use cases),
  • It's obvious that the author likes nice code and can produce one,
  • Very well thought out road map (for a loong time to come).

Cons of QCustomPlot:

  • Very strictly cartesian (read: no pie charts),
  • In my case took some time to get the necessary grip of all things important (if one likes to implement extensions of comparable quality to the basis),
  • Maybe a little slow evolution (as many other one-busy-man projects),
  • Only usable in main thread (i. e. when you need to generate pictures in, say, multithreaded webserver, you need to run this library in the main thread, whatever that means for your implementation).

If LGPL-ish license is required, there may not be a free of charge option (depends on the consideration of the author). Given the quality and usability of the library, the donation my company gave in exchange for the LGPL license agreement was not undue.

Asexual answered 10/12, 2013 at 12:47 Comment(5)
That sounds weird - if someone donates and receives a LGPL license, what's keeping the Licensee from redistributing the library as LGPL going forward? LGPL permits you to redistribute. Do you mean you donated to receive a more permissive (than GPL) license? Because if you received an LGPL license, you could've just redistributed the code under LGPL all over the internet legally.Anchorage
Maybe we could have but that is not our business priority :-)Asexual
Yeah, I'm not suggesting you do that. =) That wouldn't be in the spirit of it for sure - I just meant that the developer/owner should understand and fix that.Anchorage
As I take it, the author may very well be aware of this possible distribution channel but I'll forward it to him anyway. Thank you for pointing this out, it is an interesting piece of information for me, too.Asexual
Just for the record, in-case my original comment is misinterpreted, I don't find the "donate for commercial license" weird. Programmers have to make a living! It was the "Donate for LGPL" that seems like it wouldn't be sustainable. A "Donate for an LGPL -like license", but one not permitting re-licensing to others, would make perfect sense.Anchorage
E
5

Pros:

  • Easy to get started IMO (The API is intuitive and well documented)
  • Good plot quality and fast response when panning and zooming.
  • Single .h/.cpp file (i.e. no need to reference compiled libraries other than QTs)

Cons:

  • GPL (not LGPL)
  • Internally uses a data structure that stores 6 doubles for each data point even when you only need X and Y
  • Internally it uses a QMap to store the data points and keep them sorted. Very efficient for panning and zooming but very slow to populate when the number of samples is large (e.g. 1,000,000 data points)
Eliaeliades answered 5/1, 2015 at 4:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.