Results 1 to 3 of 3

Thread: Help: spectrogram plot and color scale

  1. #1
    Join Date
    Oct 2009
    Posts
    13
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Help: spectrogram plot and color scale

    Hi,
    I'm quite new in using qwt libraries and qt so probably my question is trivial.
    I have a spectrogram plot in a main window generated from a data array:
    ->setData(...)
    ->replot()
    Once I have the spectrogram displayed I just want to add the possibility to change the scales (x,y and color) without loading again the data to the spectrogram. For the x and y scales it is very easy I have used:
    setAxisScale(QwtPlot::xButtom,x1,x2)
    setAxisScale(QwtPlot::yLeft,y1,y2)
    I cannot figure out the procedure to change the color scale. At the beginning the color scale is set just finding the maximum and the minimum of my data array let's say zmin and zmax. How can I replot the spectrogram using different values for zmin and zmax?

    Thank you for your attention.

    Bye
    Giuseppe

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,253
    Thanked 860 Times in 809 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Help: spectrogram plot and color scale

    plot->axisWidget(...)->setColorMap(spectrogram->data().range(),
    spectrogram->colorMap());

    Uwe

  3. #3
    Join Date
    Oct 2009
    Posts
    13
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Help: spectrogram plot and color scale

    Thank you!!!

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.