diff --git a/src/CPPlot.cpp b/src/CPPlot.cpp index 7dbfb1df3..8a96d0d9a 100644 --- a/src/CPPlot.cpp +++ b/src/CPPlot.cpp @@ -74,7 +74,7 @@ CPPlot::CPPlot(QWidget *parent, Context *context, bool rangemode) : QwtPlot(pare setAxisScaleEngine(xBottom, new QwtLogScaleEngine); // left yAxis scale prettify - QwtScaleDraw *sd = new QwtScaleDraw; + sd = new QwtScaleDraw; sd->setTickLength(QwtScaleDiv::MajorTick, 3); sd->enableComponent(QwtScaleDraw::Ticks, false); sd->enableComponent(QwtScaleDraw::Backbone, false); @@ -280,10 +280,13 @@ CPPlot::setSeries(CriticalPowerWindow::CriticalSeriesType criticalSeries) // set axis title setAxisTitle(yLeft, QString ("%1 %2 (%3) %4").arg(prefix).arg(series).arg(units).arg(postfix)); - if (criticalSeries == CriticalPowerWindow::veloclinicplot) + if (criticalSeries == CriticalPowerWindow::veloclinicplot) { + setAxisScaleDraw(xBottom, ltsd); setAxisTitle(xBottom, tr("Power")); - else + } else { + setAxisScaleDraw(xBottom, sd); setAxisTitle(xBottom, tr("Interval Length")); + } // zap the old curves clearCurves(); diff --git a/src/CPPlot.h b/src/CPPlot.h index 5d9f59fb5..9d05423e0 100644 --- a/src/CPPlot.h +++ b/src/CPPlot.h @@ -171,6 +171,7 @@ class CPPlot : public QwtPlot QList allZoneLabels; LogTimeScaleDraw *ltsd; + QwtScaleDraw *sd; // tooltip / zooming LTMCanvasPicker *canvasPicker;