Skip to content

Commit

Permalink
improved plot of tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlib committed Mar 2, 2023
1 parent 4216ec3 commit 855e6d4
Show file tree
Hide file tree
Showing 3 changed files with 184 additions and 187 deletions.
4 changes: 2 additions & 2 deletions pyptv/calibration_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def attach_tools(self):
self.handle_mapper, "updated", remove=False
)

def drawcross(self, str_x, str_y, x, y, color1, mrk_size):
def drawcross(self, str_x, str_y, x, y, color1="blue", mrk_size=1, marker="plus"):
"""
Draws crosses on images
"""
Expand All @@ -186,7 +186,7 @@ def drawcross(self, str_x, str_y, x, y, color1, mrk_size):
(str_x, str_y),
type="scatter",
color=color1,
marker="plus",
marker=marker,
marker_size=mrk_size,
)
self._plot.request_redraw()
Expand Down
4 changes: 2 additions & 2 deletions pyptv/detection_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,15 @@ def attach_tools(self):
self._plot.value_mapper.on_trait_change(
self.handle_mapper, 'updated', remove=False)

def drawcross(self, str_x, str_y, x, y, color1, mrk_size):
def drawcross(self, str_x, str_y, x, y, color1, mrk_size, marker="plus"):
"""
Draws crosses on images
"""
# self._plot.plotdata = ArrayPlotData(x=x[0], y=y[0])
self._plot_data.set_data(str_x, x)
self._plot_data.set_data(str_y, y)
self._plot.plot((str_x, str_y), type="scatter",
color=color1, marker="plus", marker_size=mrk_size)
color=color1, marker=marker, marker_size=mrk_size)
self._plot.request_redraw()

def drawline(self, str_x, str_y, x1, y1, x2, y2, color1):
Expand Down
Loading

0 comments on commit 855e6d4

Please sign in to comment.