Results 1 to 7 of 7

Thread: How to make curves with empty intervals in them?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2009
    Location
    Vienna
    Posts
    91
    Thanks
    18
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to make curves with empty intervals in them?

    Yes the first is just a horizontal line.

    The Array of constant functions will produce this:

    "_________ _________ ______________"
    f1(1). .......f2(1) .........f3(1)

    three or more f(..) at the same y-position, but with different x-points will possibly work..

    greetz AP.

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

    Default Re: How to make curves with empty intervals in them?

    1) If you want to display a curve with gaps overload QwtPlotCurve::drawXY ( don't use markers ).
    2) By curve->setItemAttribute(QwtPlotItem::Legend, ...) you can control if a curve ( or any other QwtPlotItem ) should have an entry on the legend.

    Uwe

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

    alex_sh (20th September 2010)

  4. #3
    Join Date
    Sep 2010
    Posts
    46
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to make curves with empty intervals in them?

    Thank you both.
    I solved this by creating multiple curves and disabling the legend items (using setItemAttribute()) on all of them except the first one.
    Note that I had to disable the legend item _before_ the attach() call, or it would still allocate the space in the legend, but draw nothing there.

    P.S. There's no QwtPlotCurve::drawXY() in Qwt6, or am I mistaken?

  5. #4
    Join Date
    Oct 2010
    Posts
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to make curves with empty intervals in them?

    Hi,
    I have resolved this problem to using nan values, see the attached files
    qwt_plot_piecewise_curve.h
    qwt_plot_piecewise_curve.cpp

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

    alex_sh (26th October 2010)

Similar Threads

  1. Information about curves
    By den in forum Qwt
    Replies: 1
    Last Post: 27th April 2010, 19:02
  2. Select multiple curves
    By aimsc in forum Qwt
    Replies: 2
    Last Post: 30th October 2009, 10:45
  3. Multiple curves on top of each other
    By jmsbc in forum Qwt
    Replies: 2
    Last Post: 15th July 2009, 19:46
  4. Replies: 2
    Last Post: 12th September 2008, 08:43
  5. remove directory empty or not empty
    By raphaelf in forum Newbie
    Replies: 12
    Last Post: 27th October 2006, 07:30

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
  •  
Qt is a trademark of The Qt Company.