Results 1 to 3 of 3

Thread: Labeling a curve

  1. #1
    Join Date
    May 2011
    Posts
    9
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Labeling a curve

    Hi,

    I am new to Qt and Qwt. I want to set a label or a title for the plotted curve. I tried setting something like this:

    Qt Code:
    1.  
    2. curve.setTitle("some curve");
    To copy to clipboard, switch view to plain text mode 

    but "some curve" is not shown.

    Any ideas?

    many thanks.

  2. #2
    Join Date
    May 2011
    Posts
    239
    Thanks
    4
    Thanked 35 Times in 35 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Symbian S60

    Default Re: Labeling a curve

    I don't know anything about Qwt, but out of curiosity I checked what http://qwt.sourceforge.net/class_qwt_plot_curve.html says about it and that page doesn't know setTitle, but implies that the title is given as constructor argument: QwtPlotCurve::QwtPlotCurve ( const QString & title = QString::null)

  3. #3
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,253
    Thanked 860 Times in 809 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Labeling a curve

    Quote Originally Posted by kalgorithmist View Post
    ... but "some curve" is not shown.
    Wow this code is really optimistic ...

    All plot items need to be allocated by new and attached to the plot widget. Then the title might be displayed on the legend of the plot widget - when you have defined one.

    Better check the examples first ...

    Uwe

Similar Threads

  1. Replies: 4
    Last Post: 29th April 2010, 07:11
  2. Replies: 1
    Last Post: 22nd January 2010, 15:34
  3. Get a smooth curve
    By beekeep in forum Qwt
    Replies: 2
    Last Post: 7th January 2010, 18:49
  4. Labeling scatter plot points
    By hamid ghous in forum Qwt
    Replies: 1
    Last Post: 29th October 2009, 07:35
  5. Want to draw Curve
    By santhoshv84 in forum Qt Programming
    Replies: 1
    Last Post: 12th September 2008, 08:14

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.