QCustomPlot Discussion and Comments

graphs with different x axisReturn to overview

Hi!

I have a quick question.
I have two data sets. One recorded with a frequency of 1000Hz and another with a frequency of 500Hz. I want want to display 10 seconds of each (so 10,000 points for the first, and 5,000 points for the second).

Thing is, as a plot only have one x-axis, le second graph occupy only half of the plot (as it has half the data point for the same time). So I was thinking of making second plot for the second file, where I adjusted the x-axis in order for the plots to occupy the same width.

But maybe there is another solution? Is it possible to have multiple graphs in the same plot with different x-axis (i.e. with different number of points), but occupying the same space (= the width of the plot)?
Or have I to create on widget for each data set like I proposed?
(Also note that I have 2 data sets in my example, but I have to be able to handle n data set)

The easiest solution is to timestamp your samples and use only one axis with a QCPAxisTickerDateTime ticker.

If you want to use a dedicated axis for each graph, look at QCPAxisRect::addAxis