Results 1 to 3 of 3

Thread: Graph rotation

  1. #1
    Join Date
    Sep 2008
    Posts
    26
    Thanks
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Graph rotation

    Hello,

    I have a QwtPlot that I would like to rotate like shown in the image below :

    rotatingCurve.jpg

    The particularity is that the y axis in the rotated plot is with positive values on the left and the negative ones on the right.

    I could simply rotate the QwtPlotCurve data but I don't see how to rotate the axes ?
    I think the best way would be not to change the data, but to change the axes setting so that the QwtPlot Curves are plotted rotated ...

    Any ideas ?

    Thanks in advance,

    Joel.

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

    Default Re: Graph rotation

    How to invert the direction of an axis depends: if you are using QwtPlot::setAxisScale simply exchange the values for the min and max parameters. If you are using the autoscaler you have to enable the QwtScaleEngine::Inverted flag.

    If you want to exchange x/y coordinates without copying your values I guess implementing your own QwtData bridge might be the easiest way.

    Uwe

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

    jomarin (16th August 2010)

  4. #3
    Join Date
    Sep 2008
    Posts
    26
    Thanks
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Graph rotation

    Thanks Uwe, I tried and it works great

Similar Threads

  1. rotation and drawTexture
    By makism in forum Qt Programming
    Replies: 0
    Last Post: 24th May 2010, 08:01
  2. Screen Rotation - qt embedded 4.5
    By Beppe in forum Qt Programming
    Replies: 2
    Last Post: 17th April 2009, 11:32
  3. Ellipse and rotation
    By navi1084 in forum Qt Programming
    Replies: 3
    Last Post: 9th March 2009, 10:43
  4. Rotation on Qframe
    By Pharell in forum Qt Programming
    Replies: 11
    Last Post: 2nd April 2008, 16:31
  5. Rotation problem
    By boss_bhat in forum Qt Programming
    Replies: 5
    Last Post: 17th January 2007, 16:46

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.