MCPcopy Create free account
hub / github.com/KDE/labplot / showHistogram

Method showHistogram

src/frontend/spreadsheet/StatisticsColumnWidget.cpp:316–337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316void StatisticsColumnWidget::showHistogram() {
317 // add plot
318 auto* plot = addPlot(&m_histogramWidget);
319
320 auto axes = plot->children<Axis>();
321 for (auto* axis : std::as_const(axes)) {
322 if (axis->orientation() == Axis::Orientation::Horizontal) {
323 axis->title()->setText(m_column->name());
324 axis->majorGridLine()->setStyle(Qt::NoPen);
325 } else
326 axis->title()->setText(i18n("Frequency"));
327
328 axis->setMinorTicksDirection(Axis::noTicks);
329 }
330 QApplication::processEvents(QEventLoop::AllEvents, 100);
331
332 auto* histogram = new Histogram(QString());
333 plot->addChild(histogram);
334 histogram->setDataColumn(m_column);
335
336 m_histogramInitialized = true;
337}
338
339void StatisticsColumnWidget::showKDEPlot() {
340 // add plot

Callers

nothing calls this directly

Calls 10

majorGridLineMethod · 0.80
QStringClass · 0.50
orientationMethod · 0.45
setTextMethod · 0.45
titleMethod · 0.45
nameMethod · 0.45
setStyleMethod · 0.45
addChildMethod · 0.45
setDataColumnMethod · 0.45

Tested by

no test coverage detected