{"id":1985,"date":"2007-07-12T08:00:46","date_gmt":"2007-07-12T13:00:46","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2007\/07\/12\/tracking-the-mouse-pointer\/"},"modified":"2007-08-28T12:15:08","modified_gmt":"2007-08-28T17:15:08","slug":"tracking-the-mouse-pointer","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2007\/07\/12\/tracking-the-mouse-pointer\/","title":{"rendered":"Tracking the mouse pointer"},"content":{"rendered":"<p>In MATLAB, with tooltips, you can know what the value of a line is at a given point:<\/p>\n<p><a class=\"imagelink\" title=Nogtrack.jpg href=\"https:\/\/blogs.mathworks.com\/images\/pick\/Nogtrack.jpg\"><img decoding=\"async\" id=\"image1983\" width=500 alt=Nogtrack.jpg src=\"https:\/\/blogs.mathworks.com\/images\/pick\/Nogtrack.jpg\" \/> <\/a><\/p>\n<p>But if you want to know the value of an arbitrary point in a figure, you will want <a title=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=15099&#038;objectType=file (link no longer works)\">gtrack<\/a>:<\/p>\n<p><a class=\"imagelink\" title=gtrack.JPG href=\"https:\/\/blogs.mathworks.com\/images\/pick\/gtrack.JPG\"><img decoding=\"async\" id=\"image1984\" width=500 alt=gtrack.JPG src=\"https:\/\/blogs.mathworks.com\/images\/pick\/gtrack.JPG\" \/> <\/a><\/p>\n<p>This is a nice little utility function that can be put on your MATLAB path, and then invoked with a few keystrokes at the command line.  I like how the title keeps the X,Y formatted such that as you move the mouse the values do not jump around the title as significant figures in the location change.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In MATLAB, with tooltips, you can know what the value of a line is at a given point:<\/p>\n<p>But if you want to know the value of an arbitrary point in a figure, you will want gtrack:<\/p>\n<p>This is a nice&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2007\/07\/12\/tracking-the-mouse-pointer\/\">read more >><\/a><\/p>\n","protected":false},"author":68,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/1985"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=1985"}],"version-history":[{"count":0,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/1985\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=1985"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=1985"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=1985"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}