Results 1 to 6 of 6

Thread: How can I insert more than one y-axis?

  1. #1
    Join Date
    Feb 2012
    Location
    Stuttgart / Germany
    Posts
    35
    Thanks
    6
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Question How can I insert more than one y-axis?

    Hello, I'm new in this forum. I found a lot of information here that helped me before, I hope someone can help me in this new problem.
    I'm using QwtPlot to draw a x-y graph, but I have a lot of information to draw, not just one curve, and some of those information have scale completely different. Some information have small numbers (-0.0005 to 0.0005) and some information have big numbers (1000 to 2000). When I draw all information together using just one y-axis, I have to scroll the graph to see all curves because one information could be at the end of the range and another one at the beginning. It would be better for me if I can plot all curves and each one has its own y-axis, and then I can have a different range and scale for each one and show all of them using just one graph. I have to see all my curves together, because I have to compare them, when I cannot see all curves in the screen I cannot compare.

    I don't know how to do it and actually I don't even know if it's possible. I hope I explained in a way that someone can understand me and help me with this problem.
    I attached two pictures to explain what I have and what I need.

    This picture is what I have know, just one y-axis:

    have_now.jpg

    This picture is what I need to do:

    I_want.jpg

    I hope someone can help me.
    Is it possible to do? How can I do it?

    Thanks in advance
    Regards

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

    Default Re: How can I insert more than one y-axis?

    QwtPlot doesn't support more than 2 y axes ( yLeft + yRight ).

    But there is an unofficial patch here: http://sourceforge.net/tracker/?func...93&atid=313693

    Uwe

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

    cesroc (10th February 2012)

  4. #3
    Join Date
    Feb 2012
    Location
    Stuttgart / Germany
    Posts
    35
    Thanks
    6
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: How can I insert more than one y-axis?

    Thanks a lot Uwe. I found this patch yesterday. I have another question. Maybe it's a stupid question, but like I said I'm new using Qwt.
    Can you help me and tell me how I can set this patch using windows?
    I don't know how and I didn't find enought information about how to do that.
    Thanks a lot.
    Regards

    Thanks a lot Uwe. I found this patch yesterday. I have another question. Maybe it's a stupid question, but like I said I'm new using Qwt.
    Can you help me and tell me how I can set this patch using windows?
    I don't know how and I didn't find enought information about how to do that.
    Thanks a lot.
    Regards

  5. #4
    Join Date
    Jan 2012
    Posts
    23
    Thanks
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How can I insert more than one y-axis?

    You must install msysGit.

    1)Open the console Git and with cd to the directory of the module you want to patch:
    Qt Code:
    1. cd /path/to/module
    To copy to clipboard, switch view to plain text mode 
    My directory is C:\temp\qwt-6.0.0\src

    2)Enter in the console
    Qt Code:
    1. git apply -v patchname.patch
    To copy to clipboard, switch view to plain text mode 

    3)In the console should appear something like this:
    Qt Code:
    1. Checking patch filename...
    2. Applied patch filename cleanly.
    To copy to clipboard, switch view to plain text mode 
    Then rebuild the library again with the corrected files Qwt
    Last edited by oddytz1989; 10th February 2012 at 09:09.

  6. The following user says thank you to oddytz1989 for this useful post:

    cesroc (10th February 2012)

  7. #5
    Join Date
    Feb 2012
    Location
    Stuttgart / Germany
    Posts
    35
    Thanks
    6
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: How can I insert more than one y-axis?

    Thanks a lot oddytz1989. I applied the patch here and it's working pretty fine. Thanks.

  8. #6
    Join Date
    Sep 2009
    Posts
    57
    Thanks
    7
    Thanked 5 Times in 4 Posts

    Default Re: How can I insert more than one y-axis?

    Quote Originally Posted by Uwe View Post
    QwtPlot doesn't support more than 2 y axes ( yLeft + yRight ).
    Uwe
    Is there a particular reason you chose not to incorporate this into 6.x ?

    I work on GoldenCheetah and we use QWT extensively, but since we need multiple axes we have to keep a locally patched vesion of qwt in our distro (just upgraded it to 6.0.1).

    Thanks in advance,
    Mark

Similar Threads

  1. Replies: 9
    Last Post: 3rd May 2011, 21:21
  2. Replies: 4
    Last Post: 16th January 2011, 10:32
  3. Replies: 0
    Last Post: 9th August 2010, 10:46
  4. axis ans steps
    By ram1nx in forum Qwt
    Replies: 1
    Last Post: 2nd February 2010, 09:17
  5. axis question
    By mesman00 in forum Qwt
    Replies: 1
    Last Post: 12th November 2008, 14:54

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.