diff --git a/CHANGELOG b/CHANGELOG index e9ab5d7d00f359fe6e73a27ab1f0b41dd226d209..1457e9f61ab28cce9dcd5fd246d5fe1957e2d779 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -38,7 +38,7 @@ pyqtgraph-0.9.9 [unreleased] - fixed PlotCurveItem generating exceptions when data has length=0 - fixed ImageView.setImage only working once - PolyLineROI.setPen() now changes the pen of its segments as well - + - Prevent divide-by-zero in AxisItem pyqtgraph-0.9.8 2013-11-24 diff --git a/pyqtgraph/graphicsItems/AxisItem.py b/pyqtgraph/graphicsItems/AxisItem.py index 425fdd932381d5c04b75b2a2f98948548960f9a9..0ddd02a830bcc828a0fc61edbed70c72c0f62c2c 100644 --- a/pyqtgraph/graphicsItems/AxisItem.py +++ b/pyqtgraph/graphicsItems/AxisItem.py @@ -458,8 +458,7 @@ class AxisItem(GraphicsWidget): return [] ## decide optimal minor tick spacing in pixels (this is just aesthetics) - pixelSpacing = size / np.log(size) - optimalTickCount = max(2., size / pixelSpacing) + optimalTickCount = max(2., np.log(size)) ## optimal minor tick spacing optimalSpacing = dif / optimalTickCount