| 337 | } |
| 338 | |
| 339 | void StatisticsColumnWidget::showKDEPlot() { |
| 340 | // add plot |
| 341 | auto* plot = addPlot(&m_kdePlotWidget); |
| 342 | |
| 343 | // set the axes labels |
| 344 | auto axes = plot->children<Axis>(); |
| 345 | for (auto* axis : std::as_const(axes)) { |
| 346 | if (axis->orientation() == Axis::Orientation::Horizontal) |
| 347 | axis->title()->setText(m_column->name()); |
| 348 | else |
| 349 | axis->title()->setText(i18n("Density")); |
| 350 | |
| 351 | axis->setMinorTicksDirection(Axis::noTicks); |
| 352 | } |
| 353 | |
| 354 | QApplication::processEvents(QEventLoop::AllEvents, 100); |
| 355 | |
| 356 | // add normalized histogram |
| 357 | auto* histogram = new Histogram(QString()); |
| 358 | plot->addChild(histogram); |
| 359 | histogram->setNormalization(Histogram::ProbabilityDensity); |
| 360 | histogram->setDataColumn(m_column); |
| 361 | |
| 362 | // add KDE Plot |
| 363 | auto* kdePlot = new KDEPlot(QString()); |
| 364 | plot->addChild(kdePlot); |
| 365 | kdePlot->setKernelType(nsl_kernel_gauss); |
| 366 | kdePlot->setBandwidthType(nsl_kde_bandwidth_silverman); |
| 367 | kdePlot->setDataColumn(m_column); |
| 368 | |
| 369 | m_kdePlotInitialized = true; |
| 370 | } |
| 371 | |
| 372 | void StatisticsColumnWidget::showQQPlot() { |
| 373 | // add plot |
nothing calls this directly
no test coverage detected