diff --git a/uppsrc/ScatterDraw/ScatterDraw.cpp b/uppsrc/ScatterDraw/ScatterDraw.cpp index 97239ada3..041c76675 100644 --- a/uppsrc/ScatterDraw/ScatterDraw.cpp +++ b/uppsrc/ScatterDraw/ScatterDraw.cpp @@ -1317,10 +1317,10 @@ void ScatterDraw::DoZoom(double scale, bool mouseX, bool mouseY) { } xRange *= scale; double xmun = xRange/xMajorUnit; - if (xmun > 2*xMajorUnitNum) { + if (xmun > 1.2*xMajorUnitNum) { xMajorUnit *= 2; xMinUnit = xMinUnit0; - } else if (xmun < xMajorUnitNum/2) { + } else if (xmun < xMajorUnitNum/1.5) { xMajorUnit /= 2; xMinUnit = xMinUnit0; } diff --git a/uppsrc/ScatterDraw/ScatterDraw.h b/uppsrc/ScatterDraw/ScatterDraw.h index 48aa30323..df8c58611 100644 --- a/uppsrc/ScatterDraw/ScatterDraw.h +++ b/uppsrc/ScatterDraw/ScatterDraw.h @@ -1299,8 +1299,7 @@ bool ScatterDraw::PlotTexts(T& w, const bool boldX, bool boldY) Upp::Font fontY2Num = fontYNum; fontY2Num.Italic(); -debug_h(); - if (drawXReticle) + if (drawXReticle) for(int i = 0; xMinUnit + i*xMajorUnit <= xRange; i++) { double reticleX = plotW*xMinUnit/xRange + i*plotW/(xRange/xMajorUnit); double gridX = xMinUnit + i*xMajorUnit + xMin; @@ -1326,7 +1325,7 @@ debug_h(); fround(gridWidth*plotScaleAvg), axisColor); } } - + if (drawYReticle) for(int i = 0; yMinUnit + i*yMajorUnit <= yRange; i++) { int reticleY = fround(-plotH*yMinUnit/yRange + plotH - i*plotH/(yRange/yMajorUnit));