Contour plot
-
wrote on 21 Jun 2016, 12:04 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. -
wrote on 21 Jun 2016, 12:15 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".
-
wrote on 21 Jun 2016, 12:18 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.htmlNote:
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 -
wrote on 21 Jun 2016, 14:05 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. -
wrote on 21 Jun 2016, 14:08 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
-
wrote on 21 Jun 2016, 14:43 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?
-
wrote on 21 Jun 2016, 15:24 last edited by
You can get a contour plot with Qwt:
-
You can get a contour plot with Qwt:
wrote on 22 Jun 2016, 08:29 last edited by l1q1d56HI @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 -
wrote on 13 Sept 2016, 08:25 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.