{"id":244,"date":"2008-01-28T10:10:52","date_gmt":"2008-01-28T15:10:52","guid":{"rendered":"https:\/\/blogs.mathworks.com\/videos\/2008\/01\/28\/practical-example-adding-callbacks-to-a-plot\/"},"modified":"2016-04-04T15:12:01","modified_gmt":"2016-04-04T20:12:01","slug":"practical-example-adding-callbacks-to-a-plot","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/videos\/2008\/01\/28\/practical-example-adding-callbacks-to-a-plot\/","title":{"rendered":"Practical Example: Adding callbacks to a plot"},"content":{"rendered":"This eleven minute video shows how you can make plots on two axes such that when one point of a pair is clicked, they both are highlighted.\r\n\r\nIn this video you will see:\r\n<ul>\r\n\t<li>LINE used instead of PLOT so that each data point has its own handle<\/li>\r\n\t<li>Debugging when a nested function is not closed properly<\/li>\r\n\t<li>Debugging when inputs are unspecified to a callback<\/li>\r\n\t<li>Handle graphics manipulation of marker size<\/li>\r\n\t<li>Lining up code for better readability<\/li>\r\n\t<li>Frequent testing of code to minimize errors when they do occur<\/li>\r\n<\/ul>\r\n<div><div class=\"row\"><div class=\"col-xs-12 containing-block\"><div class=\"bc-outer-container add_margin_20\"><videoplayer><div class=\"video-js-container\"><video data-video-id=\"3877438050001\" data-video-category=\"blog\" data-autostart=\"false\" data-account=\"62009828001\" data-omniture-account=\"mathwgbl\" data-player=\"rJ9XCz2Sx\" data-embed=\"default\" id=\"mathworks-brightcove-player\" class=\"video-js\" controls><\/video><script src=\"\/\/players.brightcove.net\/62009828001\/rJ9XCz2Sx_default\/index.min.js\"><\/script><script>if (typeof(playerLoaded) === 'undefined') {var playerLoaded = false;}(function isVideojsDefined() {if (typeof(videojs) !== 'undefined') {videojs(\"mathworks-brightcove-player\").on('loadedmetadata', function() {playerLoaded = true;});} else {setTimeout(isVideojsDefined, 10);}})();<\/script><\/div><\/videoplayer><\/div><\/div><\/div><\/div>\r\nAlso note, I have made a direct link the the Lazy Web open challenges page. There is a new challenge up. Don&#8217;t forget there are t-shirts for answering the one minute survey below.\r\n\r\n<a title=\"http:\/\/www.surveymonkey.com\/s.aspx?sm=uohn9AT2iUS55IcmhF3kcg_3d_3d (link no longer works)\"><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/iconFree.jpg\" alt=\"iconFree.jpg\" \/><\/a><a href=\"https:\/\/blogs.mathworks.com\/pick\/lazyweb-open-challenges\/\"><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/Lazy.jpg\" alt=\"lazy.jpg\" \/>\r\n<\/a>","protected":false},"excerpt":{"rendered":"<div class=\"thumbnail thumbnail_asset asset_overlay video\"><a href=\"https:\/\/blogs.mathworks.com\/videos\/2008\/01\/28\/practical-example-adding-callbacks-to-a-plot\/?dir=autoplay\"><img decoding=\"async\" src=\"https:\/\/cf-images.us-east-1.prod.boltdns.net\/v1\/static\/62009828001\/62e70666-6b64-49ca-bd2a-8d4563926e6e\/8139c0a4-7c91-4737-a237-0b59821d71b3\/160x90\/match\/image.jpg\" onError=\"this.style.display ='none';\"\/>\n      <div class=\"overlay_container\">\n      <span class=\"icon-video icon_color_null\"><time class=\"video_length\">11:51<\/time><\/span>\n      <\/div>\n      <\/a><\/div><p>This eleven minute video shows how you can make plots on two axes such that when one point of a pair is clicked, they both are highlighted.\r\n\r\nIn this video you will see:\r\n\r\n\tLINE used instead of&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/videos\/2008\/01\/28\/practical-example-adding-callbacks-to-a-plot\/\">read more >><\/a><\/p>","protected":false},"author":68,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[19,4,20],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/244"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/comments?post=244"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/244\/revisions"}],"predecessor-version":[{"id":2125,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/244\/revisions\/2125"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/media?parent=244"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/categories?post=244"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/tags?post=244"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}