Improve plotting

This commit is contained in:
2024-03-31 23:08:19 +02:00
parent 8cad89d649
commit 30e775d8a2
122 changed files with 4640 additions and 1149 deletions
+6 -6
View File
@@ -24,14 +24,14 @@ const std::vector<uint64_t> &ADUHistogram::GetHistogram() const {
return histogram;
}
Plot ADUHistogram::GetPlot() const {
MultiLinePlot ADUHistogram::GetPlot() const {
std::unique_lock<std::mutex> ul(m);
Plot ret;
ret.x.resize(ADU_HISTO_BIN_COUNT);
ret.y.resize(ADU_HISTO_BIN_COUNT);
MultiLinePlot ret(1);
ret[0].x.resize(ADU_HISTO_BIN_COUNT);
ret[0].y.resize(ADU_HISTO_BIN_COUNT);
for (int i = 0; i < ADU_HISTO_BIN_COUNT; i++) {
ret.x[i] = ADU_HISTO_BIN_WIDTH * i + ADU_HISTO_BIN_WIDTH / 2;
ret.y[i] = histogram[i];
ret[0].x[i] = ADU_HISTO_BIN_WIDTH * i + ADU_HISTO_BIN_WIDTH / 2;
ret[0].y[i] = histogram[i];
}
return ret;
}