{"id":5420,"date":"2014-07-04T09:00:18","date_gmt":"2014-07-04T13:00:18","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/?p=5420"},"modified":"2014-07-03T10:23:02","modified_gmt":"2014-07-03T14:23:02","slug":"manage-your-figures","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2014\/07\/04\/manage-your-figures\/","title":{"rendered":"Manage your figures"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <p><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/15007\">Jiro<\/a>'s pick this week is <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/3162-useful-figure-management-utilities\">Useful Figure Management Utilities<\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/3777\">Michelle Hirsch<\/a>.\r\n   <\/p>\r\n   <p>One of the reasons I really enjoy programming in MATLAB is the interactive development environment (IDE). The various components\r\n      allow me to be productive when I'm developing an algorithm or analyzing some data. But what makes the environment even more\r\n      powerful is the ability to programmatically customize some of the workflows. The 3 useful functions provided by Michelle help\r\n      with managing your figure windows. The function names are self-explanatory, but here they are.\r\n   <\/p>\r\n   <div>\r\n      <ul>\r\n         <li><tt>figshift<\/tt> - This is useful when you create a couple of figures and quickly want to be able to click back and forth between the two.\r\n            Calling this function will shift the current figure window slightly from the previous window, allowing you to easily click\r\n            between the two.\r\n         <\/li>\r\n         <li><tt>fillscreen<\/tt> - As the name suggests, this \"maximizes\" the figure window to fill the whole screen.\r\n         <\/li>\r\n         <li><tt>showmethefigs<\/tt> - This is my favorite. By calling this after you create all the figures, you can cycle through all the figure windows by\r\n            hitting a key on your keyboard.\r\n         <\/li>\r\n      <\/ul>\r\n   <\/div>\r\n   <p>While you can use these functions directly from the Command Window, I find them most useful by sprinkling these within my\r\n      script. This way, my figures will be placed appropriately at the end of the script.\r\n   <\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">surf(peaks)\r\nfillscreen\r\nfigure\r\nplot(rand(10,3))\r\nfigure\r\nspy(bucky)\r\nfigshift<\/pre><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/jiro\/potw_figuremanagement\/figuremanagement_screenshot.png\"> <\/p>\r\n   <p><b>Comments<\/b><\/p>\r\n   <p>This entry was so useful that it inspired Mirko to create <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/12-central-diff-m\">\"Figure Management Utilities\"<\/a> with additional functionality. Do you have any other favorite utilities that allow you to be more productive with the MATLAB\r\n      IDE? Tell us about it <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=5420#respond\">here<\/a> or leave a <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/3162-useful-figure-management-utilities#comments\">comment<\/a> for Michelle.\r\n   <\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_b3028c336dbd46c1a0e5961246de18dd() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='b3028c336dbd46c1a0e5961246de18dd ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' b3028c336dbd46c1a0e5961246de18dd';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        author = '';\r\n        copyright = 'Copyright 2014 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add author and copyright lines at the bottom if specified.\r\n        if ((author.length > 0) || (copyright.length > 0)) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (author.length > 0) {\r\n                d.writeln('% _' + author + '_');\r\n            }\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\\n');\r\n      \r\n      d.title = title + ' (MATLAB code)';\r\n      d.close();\r\n      }   \r\n      \r\n-->\r\n<\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_b3028c336dbd46c1a0e5961246de18dd()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n            the MATLAB code \r\n            <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; R2014a<br><\/p>\r\n<\/div>\r\n<!--\r\nb3028c336dbd46c1a0e5961246de18dd ##### SOURCE BEGIN #####\r\n%%\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/15007\r\n% Jiro>'s pick this week is\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/3162-useful-figure-management-utilities Useful Figure\r\n% Management Utilities> by\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/3777\r\n% Michelle Hirsch>.\r\n%\r\n% One of the reasons I really enjoy programming in MATLAB is the\r\n% interactive development environment (IDE). The various components allow\r\n% me to be productive when I'm developing an algorithm or analyzing some\r\n% data. But what makes the environment even more powerful is the ability to\r\n% programmatically customize some of the workflows. The 3 useful functions\r\n% provided by Michelle help with managing your figure windows. The function\r\n% names are self-explanatory, but here they are.\r\n%\r\n% * |figshift| - This is useful when you create a couple of figures and\r\n% quickly want to be able to click back and forth between the two. Calling\r\n% this function will shift the current figure window slightly from the\r\n% previous window, allowing you to easily click between the two.\r\n% * |fillscreen| - As the name suggests, this \"maximizes\" the figure window\r\n% to fill the whole screen.\r\n% * |showmethefigs| - This is my favorite. By calling this after you create\r\n% all the figures, you can cycle through all the figure windows by hitting\r\n% a key on your keyboard.\r\n%\r\n% While you can use these functions directly from the Command Window, I\r\n% find them most useful by sprinkling these within my script. This way, my\r\n% figures will be placed appropriately at the end of the script.\r\n%\r\n%   surf(peaks)\r\n%   fillscreen\r\n%   figure\r\n%   plot(rand(10,3))\r\n%   figure\r\n%   spy(bucky)\r\n%   figshift\r\n%\r\n% <<figuremanagement_screenshot.png>>\r\n%\r\n% *Comments*\r\n%\r\n% This entry was so useful that it inspired Mirko to create\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/12-central-diff-m \"Figure\r\n% Management Utilities\"> with additional functionality. Do you have any\r\n% other favorite utilities that allow you to be more productive with the\r\n% MATLAB IDE? Tell us about it\r\n% <https:\/\/blogs.mathworks.com\/pick\/?p=5420#respond here> or leave a\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/3162-useful-figure-management-utilities#comments\r\n% comment> for Michelle.\r\n\r\n##### SOURCE END ##### b3028c336dbd46c1a0e5961246de18dd\r\n-->","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/jiro\/potw_figuremanagement\/figuremanagement_screenshot.png\" onError=\"this.style.display ='none';\" \/><\/div><p>\r\n   Jiro's pick this week is Useful Figure Management Utilities by Michelle Hirsch.\r\n   \r\n   One of the reasons I really enjoy programming in MATLAB is the interactive development environment (IDE).... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2014\/07\/04\/manage-your-figures\/\">read more >><\/a><\/p>","protected":false},"author":35,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/5420"}],"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\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=5420"}],"version-history":[{"count":6,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/5420\/revisions"}],"predecessor-version":[{"id":5425,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/5420\/revisions\/5425"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=5420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=5420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=5420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}