Results 1 to 3 of 3

Thread: how to Plot multiple graphs of multiple range ?

  1. #1
    Join Date
    Feb 2013
    Location
    India
    Posts
    153
    Thanks
    27
    Thanked 18 Times in 18 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Exclamation how to Plot multiple graphs of multiple range ?

    Hello,

    I am working on an application which need to plot multiple data of multiple ranges.

    This is exactly my problem is, how to plot multiple data of multiple range on same plot area...

    I am using Qt5 QGraphicsView on linux.

    Suppose we have a data having range (0 - 10,000) and other data having range (0 - 10). and both should be plot on same area where one scale moves (0 - 10,000) and other scale moves (0 - 10) respectively.
    It will not be a problem if data have same range.. but problem is data have different range...

    anyone have idea about that?
    Last edited by karankumar1609; 11th July 2013 at 06:54. Reason: updated contents

  2. #2
    Join Date
    Nov 2007
    Posts
    55
    Thanks
    1
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: how to Plot multiple graphs of multiple range ?

    the simplest way, but not the cleanest, specially if you want to use markers or cursors, is to rescale internally the x-values to get the same range for both datasets.
    So assuming you 1. dataset would have the values (x, y): (1000, 12), (2120, 15) ... (10000, 7)
    and the 2. dataset values (1, 6), (2.5, 14) ... (10, 8)
    rescale the 2. dataset to (1000, 6), (2500, 14) ... (10000, 8)
    Another equivalent way is to change the conversion factor from physical units into pixels on the canvas.
    In both cases, you might draw 2 different x-axis.

    Did you take a look at Qwt?
    If Qwt is too heavy for your need, take a look at KplotWidget from KDE. There are only very few changes to made to get it running on Qt.

    Alain

  3. The following user says thank you to alainstgt for this useful post:

    karankumar1609 (15th July 2013)

  4. #3
    Join Date
    Feb 2013
    Location
    India
    Posts
    153
    Thanks
    27
    Thanked 18 Times in 18 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: how to Plot multiple graphs of multiple range ?

    i did the same approach for that... and created my own graph..

Similar Threads

  1. using one signal to update multiple multiple controls
    By henryjoye in forum Qt Programming
    Replies: 7
    Last Post: 13th December 2011, 14:19
  2. Replies: 2
    Last Post: 19th October 2011, 09:30
  3. Replies: 1
    Last Post: 17th May 2011, 16:12
  4. Replies: 5
    Last Post: 10th February 2010, 11:08
  5. Replies: 0
    Last Post: 21st December 2006, 11:48

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.