From 61223fb0536d4f2a29fe229e6c1666c2db83c35c Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Thu, 17 Mar 2016 00:30:13 +0100 Subject: [PATCH] scanwidget: min 3 ticks (f3b4cb2) --- artiq/gui/scanwidget.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/gui/scanwidget.py b/artiq/gui/scanwidget.py index 57141a1f2..1d9983245 100644 --- a/artiq/gui/scanwidget.py +++ b/artiq/gui/scanwidget.py @@ -173,8 +173,8 @@ class ScanWidget(QtWidgets.QWidget): if center: scale = min(scale, self.dynamicRange/abs(center)) left = a*scale/b - self.ticker.min_ticks = int(ev.size().width() / - (2.5*self._labelSize.width())) + self.ticker.min_ticks = max( + 3, int(ev.size().width()/(2.5*self._labelSize.width()))) self._setView(left, scale) def paintEvent(self, ev):