Hello everyone,
I've just started using QWT and till now, everything worked great, but now I'm having a problem with negative values on the axis of a qwtplot and the curvefitter.
I attached a lot of curves to my plot and there are two kinds of them: curves, which represent prices and therefore are always positive and curves, which represent price deviations, which can be negative and positive and therefore, if chosen, the axis has might have an interval of [-5.0; 5.0].
I am adding a curvefitter to all curves on initialization and giving the user the option to "smooth" the curve, when already attached and shown by calling
curve->setCurveAttribute(QwtPlotCurve::Fitted,true);
To copy to clipboard, switch view to plain text mode
The problem: when i do this on the price-curves everything is fine, but when the deviation curves are chosen the curve gets partially drawn outside the visible area. I've attached 2 pictures to demonstrate the problem - the first shows the normal deviation curve (which is already drawn much nearer to the xAxis than the price curves) and the second shows the behaviour when QwtPlotCurve::Fitted was applied.
My second problem is related to the first one: I dont know anything about interpolating curves and do not fully understand the Curvefitters - the first problem occurs, because the amplitude gets way out of boundaries when there is a dramatic change from rising to falling - is there a way to prevent this by setting the splicecount to a specific value or something like that?
Thx in advance for any help - I hope I'm not missing something basic.
no_fitter.jpg
fitter.jpg
Bookmarks