Fix: prevent divide-by-zero in AxisItem
This commit is contained in:
parent
eda59be46d
commit
33e4a9e213
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user