File tree 2 files changed +2
-1
lines changed
example_cursor_scatter_experimental
2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ def hover(self, event) -> None:
196
196
if self .multi_xdata :
197
197
198
198
#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 ]
200
200
index2_best = idx_good_y [np .argsort (abs (np .array (self .y_cursor )[idx_good_y ] - ydata ))[0 ]]
201
201
y = self .y_cursor [index2_best ]
202
202
good_index2 .append (index2_best )
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ def on_start(self, *args):
55
55
self .screen .figure_wgt .ymax = mygraph .ymax
56
56
# self.screen.figure_wgt.fast_draw = False #update axis during pan/zoom
57
57
self .screen .figure_wgt .multi_xdata = True
58
+ self .screen .figure_wgt .xsorted = False
58
59
59
60
#register lines instance if need to be update
60
61
self .lines .append (mygraph .line1 )
You can’t perform that action at this time.
0 commit comments