{"id":385,"date":"2005-02-24T16:48:39","date_gmt":"2005-02-24T21:48:39","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/?p=385"},"modified":"2016-05-18T17:01:15","modified_gmt":"2016-05-18T21:01:15","slug":"simultaneous-pan-and-zoom","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2005\/02\/24\/simultaneous-pan-and-zoom\/","title":{"rendered":"Simultaneous pan and zoom"},"content":{"rendered":"R14 introduced a really useful panning function to MATLAB, but it works independently of zoom (i.e., you can either pan OR zoom). Sometimes, though, you really want to do both together: pan-zoom-pan again-zoom some more-pan again-zoom out, ...\r\n\r\nBrett Shoelson's <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=2902&amp;objectType=FILE#\">Zoom to Cursor<\/a> provides an efficient, light-weight interface for combined zooming and panning. I believe he wrote it for images, but I found that it works great for data, too.\r\n\r\nAs a simple example, try something like this:\r\nload handel\r\nplot(y)\r\nzoom2cursor\r\n\r\nBe sure to check out Brett's other tools - he's got a lot of popular files because he writes useful functions that make MATLAB easier to use.\r\n\r\nSome of you might be wondering what happened to Doug. That's a good question - I think I might have lost him in Dayton. Or was it DC, or maybe Detroit? Anyway, Doug has been out and about a lot lately. Hopefully, he'll stop slacking off and will give you all some great new picks soon!","protected":false},"excerpt":{"rendered":"<p>R14 introduced a really useful panning function to MATLAB, but it works independently of zoom (i.e., you can either pan OR zoom). Sometimes, though, you really want to do both together: pan-zoom-pan... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2005\/02\/24\/simultaneous-pan-and-zoom\/\">read more >><\/a><\/p>","protected":false},"author":33,"featured_media":0,"comment_status":"closed","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\/385"}],"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\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=385"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/385\/revisions"}],"predecessor-version":[{"id":7397,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/385\/revisions\/7397"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}