Unexpected minor tick on QwtPlot x axis
I use QwtPlot to show a time series (i.e. I append a new point every 1" and the x axis autoscales).
I set x axis with major ticks only (no minor ticks) and everything is ok for a while.
After more or less 50", when I add a new point, one minor tick appears (at least its look-and-feel is the same as a minor tick) unexpectedly.
This "minor tick" seems to be "attached" to the point and it scrolls together with the x axis.
Do you have ideas on what is it?
Is there a way to avoid it?
I see the behavio with Qwt 6.1.3 under Windows.
Re: Unexpected minor tick on QwtPlot x axis
Sorry for pushing.
Can someone help with this behavior?
Thanks
Re: Unexpected minor tick on QwtPlot x axis
Not much information to guess what is going on.
A small compilable demo would help.
Uwe
1 Attachment(s)
Re: Unexpected minor tick on QwtPlot x axis
I try to do my best in the next few days to get a small example.
In the meanwhile I can add some additional info and a screenshot.
Attachment 13738
If you keep running the time series you see that the "artifact ticks" come in small groups of three of them.
You can also see that their size is smaller than the size of the major tick, and the central one in longer than the two side ticks.
But all of them are shorter than the major ticks.
The number of these "groups of ticks" is 5, and 5 is the number of the major ticks I set.
Even if I keep running the time series, after 5 groups no more artifact ticks appear.
Maybe this can help, maybe it can't.
Re: Unexpected minor tick on QwtPlot x axis
I've been able to find and fix this behavior.
For some reasons (not 100% clear to me) during the creation of the QwtPlot the QwtScalDiv can be created with some predefined major, minor and medium ticks.
Their values depend on the default value for the x scale, I think.
And so I must explicitly delete all the minor and medium ticks, otherwise they will fit into visible scale (soon or later).
Re: Unexpected minor tick on QwtPlot x axis
The ticks will always be recalculated from scratch in QwtPlot::updateAxes - the call where the calculation happens is QwtScaleEngine::divideScale.
Guess your code does changes behind the back of the plot, so that the necessary updates are not running ?
Uwe