PDA

View Full Version : Fill area between two baselines(one at top, one at bottom.



pkj
6th September 2011, 19:30
I intend to fill the area on curve between two lines(in my case horizontal). I believe for only one baseline, the requisite methods are QwtPlotCurve::setBrush() and QwtPlotCurve::setBaseline(). But how do I set two baselines?
I think the problem in this thread Fill-area-above-baseline-and-below-the-curve (http://www.qtcentre.org/threads/36122-Fill-area-above-baseline-and-below-the-curve) is very similar. However from Qwt6 I see QwtPlotCurve::fillCurve() method as virtual. Can anyone suggest how to go ahead and add more than one baselines?

Uwe
7th September 2011, 06:16
I intend to fill the area on curve between two lines(in my case horizontal).
??? - what do you want to do ?

Uwe

pkj
7th September 2011, 06:59
??? - what do you want to do ?
The variable I am trying to monitor is supposed to fluctuate between a High and Low value. Anything between High and Low is alright, higher than high and lower than low is not. So if I shade ok zone with green and not ok zone with red, it gives for easy identification.
So, instead of shading the area between the baseline and curve, I have to shade area between a high line, curve and low line. Hope I make sense.

Uwe
7th September 2011, 12:26
Anything between High and Low is alright, higher than high and lower than low is not. So if I shade ok zone with green and not ok zone with red, it gives for easy identification.
So, instead of shading the area between the baseline and curve, I have to shade area between a high line, curve and low line. Hope I make sense.
Sounds like you want to fill the area between high and low - the curve itsself doesn't matter.

But what is high/low in your case:


an fixed intervall y1->y2
a corridor between 2 curves


In case of 2 you can use QwtPlotIntervalCurve, in case of 1 see http://www.qtcentre.org/threads/44286-How-to-create-sections-on-a-Qwt-Plot.

Uwe