Results 1 to 2 of 2

Thread: how to darw a line from a point in the qwtplotcurve to a axis

  1. #1
    Join Date
    Nov 2011
    Posts
    3
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default how to darw a line from a point in the qwtplotcurve to a axis

    today I run into a problem.when I finish a qwtplotcurve,I want to draw a line from a point(any one is ok) in the qwtplotcurve to a axis(X or Y).Does anyone can give me a clue or some code to fulfill it?thank you!

  2. #2
    Join Date
    Nov 2010
    Posts
    10
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: how to darw a line from a point in the qwtplotcurve to a axis

    Can't you just add a qwtplotcurve to the plot which consists of 2 data points (1 being from an existing point and the other being a point on the axis). Use something like:
    double x=(qwtPlotCurve->data()).x(pointId);
    double y=(qwtPlotCurve->data()).y(pointId);
    to get the co-ordinates of the existing point.

  3. The following 2 users say thank you to FuNkDaDdY for this useful post:

    changanminglike (28th November 2011), frankiefrank (28th November 2011)

Similar Threads

  1. Replies: 1
    Last Post: 2nd August 2011, 18:01
  2. Replies: 9
    Last Post: 3rd May 2011, 21:21
  3. Trouble animating line point
    By Qtal in forum Newbie
    Replies: 0
    Last Post: 16th February 2011, 18:34
  4. Replies: 1
    Last Post: 9th December 2009, 17:14
  5. Replies: 1
    Last Post: 3rd December 2009, 14:23

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.