I have a simple 2D data set (x,y). Each point (xi,yi,i) (i=0,..n) corresponds to a JPG picture. The JPG names are (0.jpg, 1.jpg,...).
I would like to be able to open the corresponding JPG image, when I click on the 2D plot (i.e. the closest data point to the place I am clicking). How can I do that?