1 Attachment(s)
Contour plot of non-rectangular data?
Hi
I'm trying to figure out a way to create contour plots of data which is not necessarily on a rectangular grid. The examples shown on https://qwt.sourceforge.io/spectrogramscreenshots.html are all on rectangular grid (XY plane), while I need something like this:
Attachment 13757
Assuming all data is in eg. a three column table of X, Y, and Z values.
Can this be done in some way using Qwt?
BR,
Urban
Re: Contour plot of non-rectangular data?
You will probably have to convert your data to a regular x-y grid (i.e. equally-spaced in x and y) and use bilinear or some other form of interpolation to create z values from the values at each corner of the cell.
I believe it is possible in Qwt 6 to create an abstract data source which will furnish the data to the plot without having to make an interpolated copy. See QwtRasterData. The data source basically maps your actual data via interpolation into the rectilinear grid required for the spectrogram. I am sure Uwe can provide a definite answer.