We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc63626 commit fd2f284Copy full SHA for fd2f284
astrowidgets/bqplot.py
@@ -407,8 +407,8 @@ def _mouse_move(self, event_data):
407
yc = event_data['domain']['y']
408
409
# get the array indices into the data so that we can get data values
410
- x_index = int(np.trunc(xc + 0.5))
411
- y_index = int(np.trunc(yc + 0.5))
+ x_index = int(np.floor(xc + 0.5))
+ y_index = int(np.floor(yc + 0.5))
412
413
# Check that the index is in the array.
414
in_image = (self._data.shape[1] > x_index >= 0) and (self._data.shape[0] > y_index >= 0)
0 commit comments