tickSpacing bug fix (#836)

Fixed a bug where `tickSpacing()` would return `None` if `style['maxTickLevel'] < 2`, resulting in the axis not being drawn.
This commit is contained in:
SamSchott 2019-06-24 01:27:16 +01:00 committed by Ogi Moore
parent 1b6537b241
commit 3e7cace746

View File

@ -643,10 +643,9 @@ class AxisItem(GraphicsWidget):
maxTickCount = size / minSpacing
if dif / intervals[minorIndex] <= maxTickCount:
levels.append((intervals[minorIndex], 0))
return levels
return levels
##### This does not work -- switching between 2/5 confuses the automatic text-level-selection
### Determine major/minor tick spacings which flank the optimal spacing.
#intervals = np.array([1., 2., 5., 10., 20., 50., 100.]) * p10unit