Commit aba696f9 authored by Félix Hartmann's avatar Félix Hartmann
Browse files

In the 'Time series' window, the radius plot is now also interactive.

parent c4a02c77
......@@ -1492,6 +1492,8 @@ def show_time_series(tige_id=None):
time_select_angle, = axAngle.plot([None, None], axAngle.get_ylim(), 'k--', lw=1.5)
time_select_length, = axLength.plot([None, None], axLength.get_ylim(),
'k--', lw=1.5)
time_select_radius, = axRadius.plot([None, None], axRadius.get_ylim(),
'k--', lw=1.5)
# Otherwise, make the current tige profile black and thicker...
xt = x[cur_image, ~x[cur_image].mask]
......@@ -1502,11 +1504,14 @@ def show_time_series(tige_id=None):
'k--', lw=1.5)
time_select_length, = axLength.plot([cur_time, cur_time], axLength.get_ylim(),
'k--', lw=1.5)
time_select_radius, = axRadius.plot([cur_time, cur_time], axRadius.get_ylim(),
'k--', lw=1.5)
def on_press(event):
if event.xdata is not None and (axAngle.contains(event)[0]
or axLength.contains(event)[0]):
or axLength.contains(event)[0]
or axRadius.contains(event)[0]):
# image closest to clicked point
image = ((times - event.xdata)**2).argmin()
......@@ -1519,6 +1524,7 @@ def show_time_series(tige_id=None):
time_select_angle.set_xdata([times[image], times[image]])
time_select_length.set_xdata([times[image], times[image]])
time_select_radius.set_xdata([times[image], times[image]])
# redraw figure
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment