equal
deleted
inserted
replaced
582 y_data = items[1].GetData(start_tick, end_tick) |
582 y_data = items[1].GetData(start_tick, end_tick) |
583 |
583 |
584 # Search for the nearest point from mouse position |
584 # Search for the nearest point from mouse position |
585 if len(x_data) > 0 and len(y_data) > 0: |
585 if len(x_data) > 0 and len(y_data) > 0: |
586 length = min(len(x_data), len(y_data)) |
586 length = min(len(x_data), len(y_data)) |
587 d = numpy.sqrt((x_data[:length, 1]-event.xdata) ** 2 + \ |
587 d = numpy.sqrt((x_data[:length, 1]-event.xdata) ** 2 + |
588 (y_data[:length, 1]-event.ydata) ** 2) |
588 (y_data[:length, 1]-event.ydata) ** 2) |
589 |
589 |
590 # Set cursor tick to the tick of this point |
590 # Set cursor tick to the tick of this point |
591 cursor_tick = x_data[numpy.argmin(d), 0] |
591 cursor_tick = x_data[numpy.argmin(d), 0] |
592 |
592 |