On Thu, 23 Oct 2003 16:08:56 +0000
"Chen lili" <lili0715@...> wrote:
> Hi all,
> First thanks for those reply of my question before, they are really
> I add the following code to the example of simple_plot of Qwt for changing
> the step of axis scale.
> setAxisScale(xBottom, 0, 10, 1);
> And it didn't work at all, the x axis still shows
> Do I misunderstand the meaning of step? Or what?
> I would likt to change the x axis step to 1 instead of 2, it should look
> like 0-1-2-3-4-5-6-7-8-9-10
> Does anyone have any idea about this?
> Thanks for any hint.
I just tried with the current CVS version:
// ...a vertical line at x = 2 * pi
long mX = insertLineMarker("x = 2 pi", QwtPlot::xBottom);
setAxisScale(QwtPlot::xBottom, 0.0, 10.0, 1.0);
and it works. You have to place the call to setAxisScale() before the call
to replot() (I am guessing what went wrong).