Contour plot
-
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. -
Hi, and welcome to the Qt forum!
If Qt Charts don't provide what you need, there's also this nice library named "QCustomPlot".
-
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 -
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. -
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?
-
You can get a contour plot with Qwt:
-
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 -
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.