webquinty
25th September 2009, 11:18
Hello,
I have a plot curve with markers and pickers and it works fine.
Now I have a problem, bottom axis X is scale , for example, 0 to 60, and this axis have 200 points, right?
I known how to obtain the position of picker according with scale:
x_pos = this->plot_curve->axisScaleDraw(QwtPlot::xBottom)->map().invTransform(pos.x());
y_pos = this->plot_curve->axisScaleDraw(QwtPlot::yLeft)->map().invTransform(pos.y());
But now, I am interesting in obtain X unscale position, for examle, my scale is 0 - 60 and I have 200 points, then if I click with picker in point 30, unscale value is 100.
How can I do it?
Best regards
I have a plot curve with markers and pickers and it works fine.
Now I have a problem, bottom axis X is scale , for example, 0 to 60, and this axis have 200 points, right?
I known how to obtain the position of picker according with scale:
x_pos = this->plot_curve->axisScaleDraw(QwtPlot::xBottom)->map().invTransform(pos.x());
y_pos = this->plot_curve->axisScaleDraw(QwtPlot::yLeft)->map().invTransform(pos.y());
But now, I am interesting in obtain X unscale position, for examle, my scale is 0 - 60 and I have 200 points, then if I click with picker in point 30, unscale value is 100.
How can I do it?
Best regards