diff --git a/uppsrc/ScatterDraw/ScatterDraw.cpp b/uppsrc/ScatterDraw/ScatterDraw.cpp index 0d397f2ed..3e4e0e527 100644 --- a/uppsrc/ScatterDraw/ScatterDraw.cpp +++ b/uppsrc/ScatterDraw/ScatterDraw.cpp @@ -299,14 +299,14 @@ void ScatterDraw::FitToData(bool vertical) { maxx = maxy = maxy2 = DOUBLE_NULL; for (int j = 0; j < series.GetCount(); j++) { - if (series[j].opacity == 0) + if (series[j].opacity == 0 || series[j].PointsData()->IsExplicit()) continue; minx = min(minx, series[j].PointsData()->MinX()); maxx = max(maxx, series[j].PointsData()->MaxX()); } if (vertical) { for (int j = 0; j < series.GetCount(); j++) { - if (series[j].opacity == 0) + if (series[j].opacity == 0 || series[j].PointsData()->IsExplicit()) continue; for (int64 i = 0; i < series[j].PointsData()->GetCount(); i++) { if (series[j].primaryY) { @@ -1050,9 +1050,9 @@ void ScatterDraw::Zoom(double scale, bool mouseX, bool mouseY) xRange *= scale; if (!IsNull(maxMajorUnitsX)) { if (xRange < 2*xMajorUnit) - xMajorUnit /= 10; + xMajorUnit /= 5; else if (xRange/xMajorUnit > maxMajorUnitsX) - xMajorUnit *= 10; + xMajorUnit *= 5; AdjustMinUnitX(); } lastxRange = xRange; diff --git a/uppsrc/ScatterDraw/ScatterDraw.h b/uppsrc/ScatterDraw/ScatterDraw.h index d5fdc2e5f..499293ee7 100644 --- a/uppsrc/ScatterDraw/ScatterDraw.h +++ b/uppsrc/ScatterDraw/ScatterDraw.h @@ -538,7 +538,7 @@ bool ScatterDraw::PlotTexts(T& w, const Size &size, int scale) standard6.Height(scale*GetStdFont().GetHeight()); if (drawXReticle) - for(int i = 0; xMinUnit + i*xMajorUnit <= xRange; i++){ + for(int i = 0; xMinUnit + i*xMajorUnit <= xRange; i++) { w.DrawLine(fround(plotW*xMinUnit/xRange + i*plotW/(xRange/xMajorUnit)), plotH, fround(plotW*xMinUnit/xRange + i*plotW/(xRange/xMajorUnit)), plotH + scale*4, fround(gridWidth*scale), axisColor); @@ -585,7 +585,7 @@ bool ScatterDraw::PlotTexts(T& w, const Size &size, int scale) } int borderWidth = fround(gridWidth*scale); -#ifdef flagGUI +#ifdef flagGUI // Control highlight if (!IsNull(highlight_0)) { double delayFactor = 4*(1000. - (GetTickCount() - highlight_0))/1000.; if (delayFactor < 1) {