Results 1 to 2 of 2

Thread: 3 qwt plot with same time axis but different samplerate

  1. #1
    Join Date
    May 2012
    Posts
    1
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default 3 qwt plot with same time axis but different samplerate

    Hello all,

    I'm new in this forum and I hope that you could help me. I don't find a thread with a simliar question but I'm not sure if I have search for the correct key-words...

    I have this problem.

    I work in a project to detect if someone has sleep apnea. so I have created different captures which send the measured data over the new bluetooth4 to my host pc. in my application I will show the measured values in different plots.

    but What I don't understand and I don't found in the different examples from qwt is this.

    I have a sensor which sends all 2 seconds the body themperature and another sensor which transmit all 100ms the movement of the thorax. My professor will finally have 2 plots with the same timelength (in example a measure of 2minutes (xAxis) ) and the plots must be similar. that will mean that my measure after 1 minute must be at the same position for both plots. So I have no idea how I can do this because the one sensor receive a new measure every 2 seconds and the other every 100ms.

    and then he will also that the graph shows only the last two minutes (like the cpu example where the plot shows only the measure of 1 minute)

    I hope someone has any ideas for my problems.

    many thanks in advance

    wl06

  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: 3 qwt plot with same time axis but different samplerate

    What is the problem? As long as the x-values for all of the curves have the same units and you use the same x-axis scale range for all plots, all of the plots will be similar. The curve that displays the 100ms sampling rate data will have 20 times more points than the one that samples every 2s, but that is the only difference.

    The trick is you must convert the x values to time in seconds for both plots. So the 100ms curve will have x values at 0.0, 0.1, 0.2, 0.3, ... seconds, and the other curve will have points at 0, 2, 4, 6, 8, ... seconds.

Similar Threads

  1. Replies: 9
    Last Post: 3rd May 2011, 22:21
  2. Replies: 5
    Last Post: 19th November 2010, 03:25
  3. Is it possible to draw axis in Plot?
    By beni46 in forum Qwt
    Replies: 2
    Last Post: 26th January 2010, 13:54
  4. x-axis for waterfall plot
    By janK in forum Qwt
    Replies: 8
    Last Post: 29th July 2009, 16:00
  5. Detecting changes in the qwt plot axis
    By mrcolin in forum Qwt
    Replies: 2
    Last Post: 27th January 2009, 13:53

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.