Hello,
I'm in a situation where multiple graphs (>10) should share the same x-axis (multiple channels acquired at the same time by a DAQ system). The problem is that each trace can have millions of points, so copying the x-axis for each graph is increasing the memory requirements drastically. Is there a way with QCP2 and QSharedPointers / QCPDataContainers (or by any other means) to use the same pointer for the x-axis, but different pointers for the y-axis in different graphs?
Here is a conceptual example of what I would need:
QVector<double> time; QVector<double> channel1; QVector<double> channel2; customPlot->addGraph(); customPlot->graph()->setData(&time, &channel1); // Use pointers to data customPlot->addGraph(); customPlot->graph()->setData(&time, &channel2); // Use the same x-axis pointer, but different y-axis pointer
In order to reduce the memory footprint.
Cheers!