Moving curves

This lab is a simplified version of a real application I made. A graduate student in physics needed a simple way to compare data from experiments.
Each set of data consists of points along different curves. After having plotted the curves, one can, using the mouse, drag a curve to another location in the plot. This makes it possible to put curves close to each other in order to compare them (to compare the shape of peaks, for example).

Your program should be able to do at least the following (you can make a fancy GUI if you like): Hints: the following properties can be useful: the CurrentPoint-property of the current axis, the Pointer-property of the current figure.
axis manual 

Here is some test-data for two curves (x1, y1) and (x2, y2) (your program should work for any x, and y, with positive elements, however):

x1 = logspace(-5, 5, 60);
y1 = 5 * exp(2 * sin(log(x1)));
x2 = logspace(-4, 4, 30);
y2 = 1e-2 * (x2 + 1 ./ x2);

Here are two small images. The left shows the original position of the curves and in the right the curves have been moved.

original after movement

Back