I have image which size was 600 * 600 and it was displayed on 800 * 800 pixel screen. The x,y coordinate in which the user look on screen was recorded in an array:
x =[250,300,390,750,760];
y =[120,550,250,130,420];
In other program, I want to plot the x,y coordinate on the 600 * 600 image. The problem is that some of the x,y plot were out of the image (as shown on the picture below) since the coordinate was more that the maximum size of the image (600 * 600).
EDITED: How to transform/adjust the coordinate of the bigger image (800*800) into the smaller image (600*600) so all x,y coordinate are inside the smaller image (600*600)?
Lets say for example, the coordinate of top left image of the 600*600 inside the image of the 800*800 image is e.g. x = -10, y = 3.
Thanks.