Skip to content

Commit

Permalink
tSNE: Redraw plot every two seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
VesnaT committed Feb 11, 2019
1 parent f1eda08 commit bac2463
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Orange/widgets/unsupervised/owtsne.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@ def __init__(self):
self.__in_next_step = False
self.__draw_similar_pairs = False

def reset_needs_to_draw():
self.needs_to_draw = True

self.needs_to_draw = True
self.__timer_draw = QTimer(self, interval=2000,
timeout=reset_needs_to_draw)

def _add_controls(self):
self._add_controls_start_box()
super()._add_controls()
Expand Down Expand Up @@ -309,6 +316,7 @@ def __set_update_loop(self, loop):
self.runbutton.setText("Stop")
self.__state = OWtSNE.Running
self.__timer.start()
self.__timer_draw.start()
else:
self.setBlocking(False)
self.setStatusMessage("")
Expand All @@ -317,6 +325,7 @@ def __set_update_loop(self, loop):
if self.__state == OWtSNE.Paused:
self.runbutton.setText("Resume")
self.__timer.stop()
self.__timer_draw.stop()

def __next_step(self):
if self.__update_loop is None:
Expand Down

0 comments on commit bac2463

Please sign in to comment.