PDA

View Full Version : How to remove the 1st grid line on y-0 postion?



josentop
29th September 2011, 10:46
After inserted the scale with QwtPlotScaleItem in plot, I need to remove the 1st grid line at y-0 position. how to implement in Qwt? thanks.

Uwe
29th September 2011, 11:02
The grid gets synchronized by QwtPlotGrid::updateScaleDiv(). You can overload this method and manipulate the QwtScaleDiv objects before you pass them to the base class.

Uwe

josentop
29th September 2011, 14:10
Hi, Uwe
but updateScaleDiv() only has two lines:
updateScaleDiv(const QwtScaleDiv &xmap, const QwtScaleDiv &ymap)
{
setXDiv(xmap);
setYDiv(ymap)
}

I don't know how to modify them to match my demand. could you please give more detail? thanks.

josentop
30th September 2011, 04:17
I find the way to remove the grid line by set the major tick[0] value same as tick[1].