Results 1 to 4 of 4

Thread: Plotting from Left to Right ??

  1. #1
    Join Date
    Mar 2008
    Posts
    46
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Question Plotting from Left to Right ??

    Hi friends, I have a small problem. I am working on a Qwt related project for plotting graphs.
    I need the plotting to start from the left corner of the Qwt Plot Widget to the right . I checked the qwt example data_plot but they are generating values randomly and plotting.But i am actually acquiring data from a db and plotting but the plot happens right to left. How can i achieve this. ?



    Thank You

  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: Plotting from Left to Right ??

    Invert the scale of your x-axis ( QwtScaleEngine::setAttribute( QwtScaleEngine::Inverted ) )

    Uwe

  3. #3
    Join Date
    Mar 2008
    Posts
    46
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Question Re: Plotting from Left to Right ??

    Hi uwe thankx for the reply. !! But where do put this line. How do i use it. ( QwtScaleEngine::setAttribute( QwtScaleEngine::Inverted ) ) in the program.
    Qt Code:
    1. myPlot->setTitle("Temperature Channel");
    2. myPlot->setAxisTitle(QwtPlot::xBottom, "Time/seconds");
    3. ////////////////////////////////////
    4. myPlot->setAxisScale(QwtPlot::xBottom, m_time, m_time + 100);
    To copy to clipboard, switch view to plain text mode 


    Thank You

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Plotting from Left to Right ??

    Take a look at QwtPlot docs. There is a method to get the axis scale engine.
    J-P Nurmi

Similar Threads

  1. Multi curves plotting issue
    By fallen in forum Qwt
    Replies: 5
    Last Post: 6th May 2008, 05:47
  2. scrollbar on left side of qtextedit
    By piotrek in forum Qt Programming
    Replies: 1
    Last Post: 15th February 2008, 21:07
  3. dummy question(Error)
    By Masih in forum Qt Programming
    Replies: 12
    Last Post: 19th July 2007, 23:38
  4. left and right margins in QPrinter
    By igor_x in forum Newbie
    Replies: 0
    Last Post: 2nd November 2006, 10:42
  5. Plotting plug-in available?
    By brcain in forum Qt Programming
    Replies: 2
    Last Post: 12th September 2006, 22:58

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.