diff --git a/src/CPPlot.cpp b/src/CPPlot.cpp index 9001ce7b9..a12b68653 100644 --- a/src/CPPlot.cpp +++ b/src/CPPlot.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -526,7 +527,7 @@ CPPlot::plotModel() QVector heat; QVector time; - for (int i=0; imeanMaxArray(RideFile::watts).count() && iheatMeanMaxArray().count(); i++) { + for (int i=1; imeanMaxArray(RideFile::watts).count() && iheatMeanMaxArray().count(); i++) { QwtIntervalSample add(i/60.00f, bestsCache->meanMaxArray(RideFile::watts)[i] - bestsCache->heatMeanMaxArray()[i], bestsCache->meanMaxArray(RideFile::watts)[i]/* + bestsCache->heatMeanMaxArray()[i]*/); @@ -743,7 +744,7 @@ CPPlot::plotBests() default: case RideFile::watts: line.setColor(GColor(CCP)); - fill = (GColor(CPOWER)); + fill = (GColor(CCP)); break; case RideFile::wattsd: case RideFile::NP: @@ -752,8 +753,23 @@ CPPlot::plotBests() fill = (GColor(CPOWER)); break; } + + // when plotting power bests AND a model we draw bests as dots + // but only if in 'plain' mode .. not doing a rainbow curve. + if (rideSeries == RideFile::watts && model) { + + QwtSymbol *sym = new QwtSymbol; + sym->setStyle(QwtSymbol::Ellipse); + sym->setSize(4); + sym->setBrush(QBrush(fill)); + sym->setPen(QPen(fill)); + curve->setSymbol(sym); + curve->setStyle(QwtPlotCurve::Dots); + } + fill.setAlpha(64); line.setWidth(appsettings->value(this, GC_LINEWIDTH, 2.0).toDouble()); + curve->setPen(line); if (rideSeries == RideFile::watts) curve->setBrush(Qt::NoBrush); @@ -860,7 +876,7 @@ CPPlot::plotBests() // X-AXIS // now sort the axis for the bests curve - double xmin = 0.017; + double xmin = 1.0f/60.0f - 0.001f; double xmax = time[maxNonZero - 1]; // truncate at an hour for energy mode