Skip to content
Snippets Groups Projects
Commit 283b6b92 authored by Lan Dam's avatar Lan Dam
Browse files

Merge branch 'remove-noneed_plotting_code' into 'master'

Remove noneed plotting code

See merge request !147
parents 8c498265 37e7a88c
No related branches found
No related tags found
1 merge request!147Remove noneed plotting code
Pipeline #2798 passed with stage
in 2 minutes and 48 seconds
......@@ -116,10 +116,8 @@ class Plotting:
self.plotting_axes.set_axes_info(
ax, [total_samples], sample_no_colors=sample_no_colors,
chan_db_info=chan_db_info, linked_ax=linked_ax)
if linked_ax is None:
ax.x_list = c_data['times']
else:
ax.linkedX = x
ax.x_list = c_data['times']
ax.chan_db_info = chan_db_info
return ax
......@@ -225,10 +223,7 @@ class Plotting:
linestyle='', zorder=constants.Z_ORDER['LINE'],
color=clr[color], picker=True,
pickradius=3)
if linked_ax is None:
ax.x_list = x_list
else:
ax.linkedX = x_list
ax.x_list = x_list
ax.chan_db_info = chan_db_info
return ax
......@@ -313,12 +308,8 @@ class Plotting:
mec=clr[d_color],
picker=True, pickradius=3)
if linked_ax is None:
ax.x_list = x_list
ax.y_list = y_list
else:
ax.linkedX = x_list
ax.linkedY = y_list
ax.x_list = x_list
ax.y_list = y_list
ax.chan_db_info = chan_db_info
return ax
......
......@@ -467,26 +467,6 @@ class PlottingWidget(QtWidgets.QScrollArea):
ruler.set_visible(True)
ruler.xy1 = (xdata, 0)
ruler.xy2 = (xdata, self.bottom)
try:
if ruler == self.zoom_marker2:
# make zoom_marker2 follow mouse.
# need to disconnect when state of rulers change
self.follower = self.fig.canvas.mpl_connect(
"motion_notify_event", self.zoom_marker2_follow_mouse)
except AttributeError:
pass
def zoom_marker2_follow_mouse(self, mouseevent):
"""
Set zoom_marker2's to follow mouse's x.
:param mouseevent: motion_notify_event - event to help keeping track
of mouse move
"""
xdata = self.get_timestamp(mouseevent)
self.zoom_marker2.xy1 = (xdata, 0)
self.zoom_marker2.xy2 = (xdata, self.bottom)
self.draw()
def keyPressEvent(self, event):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment