Adding points to plots with mouse input from the user
1 次查看(过去 30 天)
显示 更早的评论
I am trying to figure out a way to assign values to variables based on the location of various clicks of a mouse on a .jpg or .png image.
Specifically, I would like to add plots to the orbitals of gravitationally bound binary stars using data from various double star observation catalogues.
Here's an example of one such orbit: http://ej.iop.org/images/1538-3881/146/3/56/Full/aj479923f1_lr.jpg
So in this example, what I want to be able to do with MATLAB is prompt the user to "Please click on the 0 tick mark and then on the 1 tick mark." Given the x,y coordinates of those tick marks I could then determine how many pixels represent one arcsecond on each individual image. I could then prompt the user to click the center of the image, on the + mark, and that would tell me the x,y coordinate of the center. From that information I could automatically plot the next projected orbit given by the catalogues I mentioned earlier.
Is this at all possible? Is there a better way?
Thank you in advance!
0 个评论
回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!