Results 1 to 2 of 2

Thread: Contour plot of non-rectangular data?

  1. #1
    Join Date
    Nov 2009
    Location
    Sweden
    Posts
    34
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default 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:
    Capture.jpg
    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

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default 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.
    Last edited by d_stranz; 13th October 2022 at 00:03.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. qwt raster data for contour plots
    By SJPDS in forum Qwt
    Replies: 0
    Last Post: 3rd August 2016, 11:46
  2. Replies: 0
    Last Post: 1st August 2014, 15:43
  3. Help understanding QWT Contour Plot
    By jwieland in forum Qwt
    Replies: 11
    Last Post: 7th December 2009, 07:47
  4. Replies: 0
    Last Post: 15th September 2009, 03:34
  5. Replies: 7
    Last Post: 22nd September 2008, 23:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.