Results 1 to 2 of 2

Thread: How to clear the plotting area?

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

    Default Re: How to clear the plotting area?

    Hello,

    I have a problem. I'm using one plot area (QwtPlot) to plot four graphs, but when I don't need them anymore I would like to clean the plot area to add another graph. I would like to insert a button that when I press clean the plot area and I can add graph again. Is it possible? Anyone has an idea how to do that?

    Thanks in advance
    Regards

    I found the solution.
    Last edited by cesroc; 2nd March 2012 at 13:34.

  2. #2
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to clear the plotting area?

    QwtPlot::detachItems() is what you want.

    Also remember to set QwtPlot::setAxisAutoScale() to true if you've used zoomer.

Similar Threads

  1. Scroll bars in scroll area not comming in scroll area
    By aurora in forum Qt Programming
    Replies: 3
    Last Post: 4th January 2012, 06:50
  2. Graph plotting
    By steg90 in forum Qt Programming
    Replies: 13
    Last Post: 6th April 2011, 10:30
  3. Plotting in 3D
    By FelixB in forum Qwt
    Replies: 1
    Last Post: 1st October 2010, 16:26
  4. Plotting graph of 1/x
    By Persoontje in forum Qwt
    Replies: 1
    Last Post: 20th March 2009, 14:26

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.