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. Contour plot
QtWS25 Last Chance

Contour plot

Scheduled Pinned Locked Moved Unsolved General and Desktop
contour plotqwtvtkfilled contour
9 Posts 3 Posters 10.2k 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.
  • L Offline
    L Offline
    l1q1d56
    wrote on 21 Jun 2016, 12:04 last edited by l1q1d56
    #1

    Hi to all, I have a data matrix with X,Y,Z and I'd like to create a dynamic plot window with:

    • filled contours
    • contours
    • raw/image plot

    could someone suggest me the best approach? Using the new Qt Chart? VTK? Other?
    I was able to plot them using matplotlib+qt but now I want to move to a clean c++ interface.

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on 21 Jun 2016, 12:15 last edited by
      #2

      Hi, and welcome to the Qt forum!

      If Qt Charts don't provide what you need, there's also this nice library named "QCustomPlot".

      1 Reply Last reply
      1
      • V Offline
        V Offline
        VRonin
        wrote on 21 Jun 2016, 12:18 last edited by VRonin
        #3

        What you want is the Qt Data Visualization Module of Qt 5.7 take a look at these 2 examples to start:
        http://doc.qt.io/qt-5/qtdatavisualization-surface-example.html
        http://doc.qt.io/qt-5/qtdatavisualization-texturesurface-example.html

        Note:
        Qt Data Visualization as well as Qt Charts and QCustomPlot mentioned above and KDChart all come with only GPL license so they cannot be used in a commercial product if you don't buy a Qt (first 2 modules) or KDAB (last module) license

        "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
        • L Offline
          L Offline
          l1q1d56
          wrote on 21 Jun 2016, 14:05 last edited by
          #4

          Thanks Wieland and VRonin. My actual target is to have quite the same rendering that I have on matplotlib:
          https://s31.postimg.org/hu4oti3ff/Untitled.png
          Do you think that it's possible with the Qt data visualization because I can't see any method on Qt chart or Qcustom plot.

          1 Reply Last reply
          0
          • V Offline
            V Offline
            VRonin
            wrote on 21 Jun 2016, 14:08 last edited by
            #5

            data visualisation creates 3D plots. the charts you posted are nothing else than the top and front view of the 3D chart, all you need to do is set two views of the same chart to have the result you want

            "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
            • L Offline
              L Offline
              l1q1d56
              wrote on 21 Jun 2016, 14:43 last edited by
              #6

              Hi VRonin, at first I thought that you were right but then, when I zoom I can see that the rendering is created with single unconnected points (just like qwt), while I need to have the isolines (so continuous contours).

              Any further suggestion? Do you know if anyone as ever implemented the marching square applied to the QT charts?

              1 Reply Last reply
              0
              • ? Offline
                ? Offline
                A Former User
                wrote on 21 Jun 2016, 15:24 last edited by
                #7

                You can get a contour plot with Qwt:

                L 1 Reply Last reply 22 Jun 2016, 08:29
                1
                • ? A Former User
                  21 Jun 2016, 15:24

                  You can get a contour plot with Qwt:

                  L Offline
                  L Offline
                  l1q1d56
                  wrote on 22 Jun 2016, 08:29 last edited by l1q1d56
                  #8

                  HI @Wieland, I used QWT trying to reproduce the filled contour result but the result is quite crappy. The border and the filled part don't match correctly.
                  https://s31.postimg.org/tw4o1thln/Untitled.png

                  1 Reply Last reply
                  0
                  • L Offline
                    L Offline
                    l1q1d56
                    wrote on 13 Sept 2016, 08:25 last edited by
                    #9

                    Hi to all,
                    I succeded in extracting from the data contours as path. Anyone knows how to plot them using qt charts?

                    http://doc.qt.io/qt-5/qtcharts-areachart-example.html

                    I need to create area charts with empty areas inside.

                    1 Reply Last reply
                    0

                    • Login

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