Results 1 to 11 of 11

Thread: QwtPlotSpectrogram and QwtRasterData

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,325
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QwtPlotSpectrogram and QwtRasterData

    x/y are values from the scales. How your values are related to the scale coordinates is something I can't tell you.

    The implementation of "value()" you have posted will be way to slow. It will be called for each pixel of the canvas ( when there is no pixelHint() ). You can't have an operation like indexOf() there.

    Also indexOf() will fail for almost all values as the position of the pixels usually never meet the position, where you have a value. So you usually have a to do something called resampling. Mostly it is a nearest neighbor algorithm, but you might use some sort of interpolation as well.

    F.e. QwtMatrixRasterData offers nearest neighbor and bilinear interpolation.

    Uwe

    PS: If all you want to do is to map values at a specific position to a colored dot QwtPlotSpectroCurve might be what you are looking for.

  2. The following user says thank you to Uwe for this useful post:

    jesse_mark (5th February 2013)

  3. #2
    Join Date
    Jun 2012
    Posts
    173
    Thanks
    48
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QwtPlotSpectrogram and QwtRasterData

    QwtPlotSpectroCurve was close to what I want to do, but as I have too many points QwtPlotSpectroCurve is a bit slow when zooming or when dropping it after panning.

    about QwtMatrixRasterData, so to use it we just assign a matrix of values to it.
    how does it assign these values to the points ???
    what is the affect of number of columns ??
    other thing is as a I have -1 means no color, I tried the addColorStop(-1,qRgba(0,0,0,0)) but the colors still show even with QwtPlotSpectroCurve.


    Thanks

Similar Threads

  1. Replies: 2
    Last Post: 1st May 2012, 23:32
  2. QwtRasterData and non-linearly sampled data
    By DizzyMoods in forum Qwt
    Replies: 3
    Last Post: 23rd December 2011, 11:50
  3. Replies: 8
    Last Post: 2nd November 2011, 16:31
  4. QwtRasterData and values
    By DKL1972 in forum Qwt
    Replies: 12
    Last Post: 10th March 2010, 09:53
  5. Convert QwtRasterData to QwtSeriesData
    By bigjoeystud in forum Qwt
    Replies: 3
    Last Post: 25th August 2009, 15:06

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
  •  
Qt is a trademark of The Qt Company.