In my application I have 5 numbers streamed to the computer every 10ms which I want to display on two graphs, one aligned above the other in real time. Three of the values will be plotted on the one graph, whilst the remaining two will be plotted on the other graph.

Using the supplied examples as a basis I have got this working using two basic QCustomPlot objects positioned one above the other. The data happily streams in and is displayed even after many minutes of running. However, having two separate QCustomPlots is a bit clunky and makes saving one bitmap image of both graphs together more awkward.

I've moved on and now tried implementing things as a single QCustomPlot which contains two "QCPAxisRect" objects, one positioned above the other. Into these I've had to create QCPGraph objects to associate with the AxisRects. The whole thing is apparently working and looks much neater, however after only 4 or 5 seconds it becomes apparent the computer is slowing to a crawl, the screen update is lagging behind the data stream which means the buffers start filling up and the whole thing just grinds down ever slower.

Given that everything runs so fast and cleanly when I display the same data across two QCustomPlot objects, why should it be so much slower trying to implement it with one QCustomPlot containing two QCPAxisRect ? Is there something obvious I might have done wrong?