QCustomPlot Discussion and Comments

Normalization of the graphReturn to overview

Hello! I do not understand how to normalize the graphs. For example, to place two graphs on one grid: the first in the range [0.1-0.8], the second in the range [50-400].

P.S. I have QVector<QCPGraphData> myData(size);
Is there a method like this: myData->normalize()?

Get the maximum in your data stored in vec using:

double max = *std::max_element(vec.constBegin(), vec.constEnd());

then divide your data by this to normalize it to unity.

Ok, thanks!