Results 1 to 7 of 7

Thread: Multiple Real-Time Curves Not Overlapping Properly

  1. #1
    Join Date
    May 2013
    Posts
    5
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Multiple Real-Time Curves Not Overlapping Properly

    Hello,

    I am trying to add two real-time plot curves to one plot object. The curves are created from captured voltages and are similar to oscilloscope curves. I need to show both curves on top of each other for reference. What is happening is each curve is only being displayed in half the width as each curve seems to be overwriting the other curve with a black rectangle, making half of it disappear during replots.

    Here is an image:

    overlapping_curves.jpg


    Is there a way, with QWT, to draw two curves on top of each other without half of the curve disappearing?

    Thanks,

    -brian

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

    Default Re: Multiple Real-Time Curves Not Overlapping Properly

    Quote Originally Posted by brianbat View Post
    What is happening is each curve is only being displayed in half the width as each curve seems to be overwriting the other curve with a black rectangle, making half of it disappear during replots
    No this is not happening - nobody fills rectangles when drawing a curve. It looks more like that the bounding x interval of the curves is different: check your samples.

    Uwe

  3. #3
    Join Date
    May 2013
    Posts
    5
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: Multiple Real-Time Curves Not Overlapping Properly

    As the curves are being displayed I can see the full curves being displayed with half of it is flashing on and off. Like I said when I display each curve separately I see the curve fill the entire view space so the bounding X interval is fine.

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

    Default Re: Multiple Real-Time Curves Not Overlapping Properly

    No you don't see anything as the x axis is disabled.

    I would guess, that you have autoscaling enabled and the x-axis changes, when you enable/disable a curve: try your application with having the x axes visible.

    Uwe

  5. #5
    Join Date
    May 2013
    Posts
    5
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: Multiple Real-Time Curves Not Overlapping Properly

    Quote Originally Posted by Uwe View Post
    No this is not happening - nobody fills rectangles when drawing a curve. It looks more like that the bounding x interval of the curves is different: check your samples.

    Uwe
    I captured three videos showing what is happening. The first two videos show the separate single plotted curves. The third video shows the two curves together in QWT and demonstrates the issue I am having.






    Added after 9 minutes:


    Quote Originally Posted by Uwe View Post
    No you don't see anything as the x axis is disabled.

    I would guess, that you have autoscaling enabled and the x-axis changes, when you enable/disable a curve: try your application with having the x axes visible.

    Uwe
    Hello, yes autoscaling is on and the x-axis was disabled. I tried enabling the x-axis and the plotted curves are still alternating on one half of the plot.
    Last edited by brianbat; 9th May 2013 at 19:59.

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

    Default Re: Multiple Real-Time Curves Not Overlapping Properly

    Quote Originally Posted by brianbat View Post
    Hello, yes autoscaling is on and the x-axis was disabled. I tried enabling the x-axis and the plotted curves are still alternating on one half of the plot.
    Of course they do, but is the axis range changing, when you enable/disable curves ?

    More interesting than your videos are the bounding rectangles of your curves: I'm pretty sure the x interval is different: the x coordinates of the second curve are above the first.

    Uwe

  7. #7
    Join Date
    May 2013
    Posts
    5
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: Multiple Real-Time Curves Not Overlapping Properly

    Sorry Uwe, I just understood what you meant. I set the same x values for both curves and everything is fine.

    Thanks for your help and patience.

Similar Threads

  1. Replies: 1
    Last Post: 22nd June 2012, 08:37
  2. QwtPlotcurve multiple curves
    By garij in forum Qwt
    Replies: 4
    Last Post: 10th May 2012, 13:30
  3. Replies: 2
    Last Post: 5th December 2011, 18:07
  4. Select multiple curves
    By aimsc in forum Qwt
    Replies: 2
    Last Post: 30th October 2009, 11:45
  5. Multiple curves on top of each other
    By jmsbc in forum Qwt
    Replies: 2
    Last Post: 15th July 2009, 20:46

Tags for this Thread

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.