PDA

View Full Version : how to darw a line from a point in the qwtplotcurve to a axis



changanminglike
22nd November 2011, 08:24
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!

FuNkDaDdY
26th November 2011, 04:56
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.