1 Attachment(s)
One scale widget for multiple x-axis
Hi,
I have many vertical time-domain signals (see picture). Every signal (timeseries of X, Y points) is displaced from line X = 0 by some value so the median value of signal is equal to some X axis -value.
Besides every signal has some additional data that should be displayed (on the picture this data is displayed as few additional X-axis). Lets suppose that this data is a single value for each signal but this data has no increasing or decreasing tendency. How would you recommend me to implement this?
I can see two ways: either I display such data in additional scale widget (but here is the problem that data has no increasing or decreasing sorting, how to deal with that?) or I could display this data as a pop-up window that appears when user click on a signal.
What would you recommend me? Is there a way to dasplay few non sorted lines of numbers (matrix) in scale widget as in the picture?
Attachment 13490
1 Attachment(s)
Re: One scale widget for multiple x-axis
I can set ticks with the code:
Code:
scaleDiv.setLowerBound(0);
scaleDiv.setUpperBound(20);
QList<double> ticksList;
for (double i = 0; i < 10; i++)
ticksList.push_back(i);
ticksList[3] = 16;
scaleDiv.setTicks(2, ticksList);
scaleWidget->setScaleDiv(scaleDiv);
but this draws ticks in the place they should be (ticks are in ascending order every tick corresponds to QwtScaleDiv value).
But I need to draw ticks which do not correspond to QwtScaleDiv. I need to somehow calculate tick position for every QwtScaleDiv value. For example if QwtScaleDiv has lower value 0 and upper bound 10 then I need to draw tick 30 at QwtScaleDraw equal to 2. How to do that?
Attachment 13492