AxisItem: Fix tick elision with self.scale set
Previously, only the highest level ticks would be displayed for e.g. scale = 1e3.
This commit is contained in:
parent
a240766607
commit
fe7e1775da
@ -693,7 +693,7 @@ class AxisItem(GraphicsWidget):
|
|||||||
## remove any ticks that were present in higher levels
|
## 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
|
## 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.
|
## 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])
|
allValues = np.concatenate([allValues, values])
|
||||||
ticks.append((spacing/self.scale, values))
|
ticks.append((spacing/self.scale, values))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user