Skip to content

Commit 86169f1

Browse files
committed
forgot to set xsorted to False
1 parent 2f61294 commit 86169f1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

example_cursor_scatter_experimental/graph_widget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def hover(self, event) -> None:
196196
if self.multi_xdata:
197197

198198
#find closest ydata from lines
199-
idx_good_y=np.where(abs(np.array(self.x_cursor) - x)<0.05)[0]
199+
idx_good_y=np.where(abs(np.array(self.x_cursor) - x)<delta)[0]
200200
index2_best = idx_good_y[np.argsort(abs(np.array(self.y_cursor)[idx_good_y] - ydata))[0]]
201201
y = self.y_cursor[index2_best]
202202
good_index2.append(index2_best)

example_cursor_scatter_experimental/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def on_start(self, *args):
5555
self.screen.figure_wgt.ymax = mygraph.ymax
5656
# self.screen.figure_wgt.fast_draw = False #update axis during pan/zoom
5757
self.screen.figure_wgt.multi_xdata=True
58+
self.screen.figure_wgt.xsorted=False
5859

5960
#register lines instance if need to be update
6061
self.lines.append(mygraph.line1)

0 commit comments

Comments
 (0)