Skip to content

Commit c2e12ed

Browse files
committed
small changes on cursor label
1 parent 59088f4 commit c2e12ed

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

example_cursor_scatter_experimental/graph_widget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ def hover(self, event) -> None:
316316

317317
#x y label
318318
if self.scatter_label and idx_best > len(good_line)-1:
319-
self.text.set_text(f"pt{self.scatter_label [good_index_scatter[idx_best]]} x={x}, y={y}")
319+
self.text.set_text(f"{self.scatter_label [good_index_scatter[idx_best]]} x={x}, y={y}")
320320
else:
321321
self.text.set_text(f"x={x}, y={y}")
322322

example_cursor_scatter_experimental/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def on_start(self, *args):
4747
mygraph = GraphGenerator()
4848

4949
self.screen.figure_wgt.figure = mygraph.fig
50-
self.screen.figure_wgt.scatter_label = mygraph.ptid
50+
self.screen.figure_wgt.scatter_label = ['pt' + str(i) for i in mygraph.ptid]
5151
self.screen.figure_wgt.axes = mygraph.ax1
5252
self.screen.figure_wgt.xmin = mygraph.xmin
5353
self.screen.figure_wgt.xmax = mygraph.xmax

0 commit comments

Comments
 (0)