Skip to content

Commit

Permalink
AxisItem: Fix tick elision with self.scale set
Browse files Browse the repository at this point in the history
Previously, only the highest level ticks would be displayed
for e.g. scale = 1e3.
  • Loading branch information
dnadlinger committed Jul 11, 2018
1 parent a240766 commit fe7e177
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyqtgraph/graphicsItems/AxisItem.py
Expand Up @@ -693,7 +693,7 @@ def tickValues(self, minVal, maxVal, size):
## remove any ticks that were present in higher levels
## we assume here that if the difference between a tick value and a previously seen tick value
## is less than spacing/100, then they are 'equal' and we can ignore the new tick.
values = list(filter(lambda x: all(np.abs(allValues-x) > spacing*0.01), values) )
values = list(filter(lambda x: all(np.abs(allValues-x) > spacing/self.scale*0.01), values))
allValues = np.concatenate([allValues, values])
ticks.append((spacing/self.scale, values))

Expand Down

0 comments on commit fe7e177

Please sign in to comment.