Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Unsolved Contour plot

    General and Desktop
    contour plot qwt vtk filled contour
    3
    9
    8325
    Loading More Posts
    • 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.
    • l1q1d56
      l1q1d56 last edited by l1q1d56

      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 Reply Quote 0
      • ?
        A Former User last edited by

        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 Reply Quote 1
        • V
          VRonin last edited by VRonin

          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 Reply Quote 1
          • l1q1d56
            l1q1d56 last edited by

            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 Reply Quote 0
            • V
              VRonin last edited by

              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 Reply Quote 0
              • l1q1d56
                l1q1d56 last edited by

                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 Reply Quote 0
                • ?
                  A Former User last edited by

                  You can get a contour plot with Qwt:

                  l1q1d56 1 Reply Last reply Reply Quote 1
                  • l1q1d56
                    l1q1d56 @Guest last edited by l1q1d56

                    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 Reply Quote 0
                    • l1q1d56
                      l1q1d56 last edited by

                      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 Reply Quote 0
                      • First post
                        Last post