I have image on an axis (axis1) in gui. I check the pixel positions of axes and check the currentpoint of mouse on the intial point of axis. The values comming from both variables are different. I execute following code. I think the first two values of pos1 and currentpoint value should be same at this point.
pos1 = getpixelposition(eventdata.axes1)
The output from this code is
0.3887 0.5098 1.2986 0.5377
The point selected is shown in the image. Later on I want to replace the values of x1,y1,x2,y2 with the position values to fill the if-else condition