Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. suggestions for graphing/plotting

suggestions for graphing/plotting

Scheduled Pinned Locked Moved Unsolved General and Desktop
12 Posts 6 Posters 7.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mzimmers
    wrote on 20 Jul 2017, 22:50 last edited by
    #1

    Hi all -

    I'm building an application whose UI will entail a simple 2D graph and a few line charts. Updates will probably occur every 100ms or so. It will look something like this:
    alt text
    After reading through the docs, and doing some googling, I discovered to my surprise that Qt doesn't appear to have any intrinsic graphing widgets. I did find a couple of 3rd party packages that look reasonable. Or, I suppose I could create my own with primitive constructs.

    Before I embark on this, though, I thought I'd ask those who have done something similar: what did you use, and would you use it again? Just looking for some guidance before I start.

    Thanks.

    J 1 Reply Last reply 21 Jul 2017, 04:34
    0
    • M mzimmers
      20 Jul 2017, 22:50

      Hi all -

      I'm building an application whose UI will entail a simple 2D graph and a few line charts. Updates will probably occur every 100ms or so. It will look something like this:
      alt text
      After reading through the docs, and doing some googling, I discovered to my surprise that Qt doesn't appear to have any intrinsic graphing widgets. I did find a couple of 3rd party packages that look reasonable. Or, I suppose I could create my own with primitive constructs.

      Before I embark on this, though, I thought I'd ask those who have done something similar: what did you use, and would you use it again? Just looking for some guidance before I start.

      Thanks.

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 21 Jul 2017, 04:34 last edited by
      #2

      @mzimmers There is Qt Charts. It is not installed by default, but you can install it easily using Qt Maintenance Tool.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • V Offline
        V Offline
        VRonin
        wrote on 21 Jul 2017, 07:07 last edited by
        #3

        Before we can get into details, could you tell us your license needs?

        • Are you ok with GPL (i.e. no commercial use and no closed source)
        • Are you ok with paying for a license to use the product commercially/closed source?
        • Do you require week copyleft/permissive licenses (LGPL,MIT,Apache,Mozzilla)?

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        1 Reply Last reply
        1
        • M Offline
          M Offline
          mzimmers
          wrote on 21 Jul 2017, 13:37 last edited by
          #4

          jsulm: thanks for pointing me to charts. I'd already glanced at it, and it didn't look quite right, but I'll look at it again.

          VRonin: for now I'm going to assume that we'll be OK with buying a commercial license, but since I'm still in the proof of concept stage, I'll be going GPL for now. So, either works, really.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 21 Jul 2017, 23:07 last edited by
            #5

            @VRonin GPL doesn't forbid commercial use (see here) however it doesn't really make sense to create a commercial application using GPL licensed API..

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            V 1 Reply Last reply 24 Jul 2017, 07:01
            0
            • M Offline
              M Offline
              mzimmers
              wrote on 21 Jul 2017, 23:12 last edited by
              #6

              I'm really not concerned about licensing from a cost standpoint. If I can show the powers-that-be that Qt is a superior alternative, they'll have the funds for licensing.

              What I'm hoping to get out of this thread is some ideas based on their technical merits. I've briefly looked at Qt Charts and it's probably adequate (overkill, even) for my meager needs. I just need a 2D graph with points, and a few moving line charts. As I said, if I can keep these updated 10X/second, that will be fine.

              1 Reply Last reply
              1
              • C Offline
                C Offline
                CroCo
                wrote on 22 Jul 2017, 00:05 last edited by CroCo
                #7

                I use QCustomPlot . It is simple and it has very nice features. I use it to plot some results for controlling robotics manipulators. Very good.

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on 22 Jul 2017, 08:45 last edited by
                  #8

                  Hi
                  I can also highly recommend CustomPlot.
                  Simply, not expensive, and no complex build requirements.
                  You be up and running in minutes.

                  1 Reply Last reply
                  0
                  • S SGaist
                    21 Jul 2017, 23:07

                    @VRonin GPL doesn't forbid commercial use (see here) however it doesn't really make sense to create a commercial application using GPL licensed API..

                    V Offline
                    V Offline
                    VRonin
                    wrote on 24 Jul 2017, 07:01 last edited by VRonin
                    #9

                    @SGaist said in suggestions for graphing/plotting:

                    @VRonin GPL doesn't forbid commercial use (see here) however it doesn't really make sense to create a commercial application using GPL licensed API..

                    From https://www.gnu.org/licenses/why-not-lgpl.html

                    using the Lesser GPL permits use of the library in proprietary programs; using the ordinary GPL for a library makes it available only for free programs.


                    On the matter at hand, the options are:

                    • Qt Chart and Qt Data Visualization modules (GPL & commercial)
                    • QCustomPlot (GPL & commercial)
                    • KD Chart (GPL & commercial)
                    • Qwt (LGPL)
                    • KPlotting (LGPL)
                    • Any JavaScript charting API (e.g. Google Charts) paired with QWebEngine or QtQuick

                    "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                    ~Napoleon Bonaparte

                    On a crusade to banish setIndexWidget() from the holy land of Qt

                    1 Reply Last reply
                    5
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 24 Jul 2017, 21:22 last edited by
                      #10

                      @VRonin In this context, commercial meant "an application that you sell".

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      1
                      • M Offline
                        M Offline
                        mzimmers
                        wrote on 25 Jul 2017, 00:03 last edited by
                        #11

                        OK, I have a more specific design question. As the image above shows, I'll have 5 items to update (and there will be more). These will probably all update at the same time. Is it considered better to have separate signals for each of these items, or to create a data structure that contains all of their information, and have a "master" signal that passes the entire data structure?

                        The first alternative is obviously simpler from the standpoint of keeping data current, but uses a lot more signals. The second would reduce the number of signals, but require me to maintain this data structure.

                        Is there a rule of thumb for knowing when to break updates into multiple signals, and when to combine them?

                        I suppose a third alternative would be to use the same signal and pass an argument indicating which item(s) are to be updated. This will make the code a little more complex, but would (probably) obviate the issue.

                        Thanks.

                        1 Reply Last reply
                        0
                        • V Offline
                          V Offline
                          VRonin
                          wrote on 25 Jul 2017, 07:01 last edited by
                          #12

                          Qt Chart and KD Chart (unfortunately I have no other experience with the other tools mentioned so I can't comment on those) can link directly to a QAbstractItemModel to refresh as soon as you update your data in the model.

                          Qt Chart, at the current development, however, refreshes the entire series every time 1 point changes making it quite slow when handling large volumes (did not test KD Chart under those conditions)

                          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                          ~Napoleon Bonaparte

                          On a crusade to banish setIndexWidget() from the holy land of Qt

                          1 Reply Last reply
                          0

                          1/12

                          20 Jul 2017, 22:50

                          • Login

                          • Login or register to search.
                          1 out of 12
                          • First post
                            1/12
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Groups
                          • Search
                          • Get Qt Extensions
                          • Unsolved