{"id":5746,"date":"2014-12-19T09:00:03","date_gmt":"2014-12-19T14:00:03","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/?p=5746"},"modified":"2014-12-18T19:11:23","modified_gmt":"2014-12-19T00:11:23","slug":"distribute-your-figures","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2014\/12\/19\/distribute-your-figures\/","title":{"rendered":"Distribute 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\/37176-distribute-figures\">\"Distribute Figures\"<\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/259004\">Anders Simonsen<\/a>.\r\n   <\/p>\r\n   <p>I must be obsessed with figure management, MATLAB figure that is. I've previously Picked three File Exchange entries around\r\n      this topic: <a href=\"https:\/\/blogs.mathworks.com\/pick\/2011\/01\/28\/cascade-your-figure-windows\/\"><tt>cascade<\/tt><\/a>, <a href=\"https:\/\/blogs.mathworks.com\/pick\/2013\/04\/26\/toggle-that-fig\/\"><tt>togglefig<\/tt><\/a>, and <a href=\"https:\/\/blogs.mathworks.com\/pick\/2014\/07\/04\/manage-your-figures\/\">Useful Figure Management Utilities<\/a>. No wonder, I was drawn to this entry by Anders.\r\n   <\/p>\r\n   <p>Have you ever generated lots of figures and wished you could quickly view all of them on one screen?<\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/jiro\/potw_distfig\/distfig_manyfigures.png\"> <\/p>\r\n   <p>Anders's <tt>distFig<\/tt> lets you do that. Let's say that you have four figure windows.\r\n   <\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">logo\r\nfigure\r\nsurf(peaks)\r\nfigure\r\nplot(rand(10,3))\r\nfigure\r\nscatter3(rand(50,1),rand(50,1),rand(50,1))<\/pre><p>Just call <tt>distFig<\/tt>, and it distributes your figures on the screen. Pass in some parameters to control how the figures are distributed.\r\n   <\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">distFig(<span style=\"color: #A020F0\">'Rows'<\/span>,2,<span style=\"color: #A020F0\">'Columns'<\/span>,2)<\/pre><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/jiro\/potw_distfig\/distfig_screenshot.png\"> <\/p>\r\n   <p>Anders provides detailed help with the function, as well as some sample code demonstrating the various uses. I also appreciate\r\n      his responsiveness to <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/37176-distribute-figures#comments\">user comments<\/a>. You can see that he quickly updated his entry to fix some issues that came up in R2014b. Great stuff, Anders!\r\n   <\/p>\r\n   <p><b>Comments<\/b><\/p>\r\n   <p>Give this a try and let us know what you think <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=5746#respond\">here<\/a> or leave a <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/37176-distribute-figures#comments\">comment<\/a> for Anders.\r\n   <\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_f8c99b62c01e4e21b844aab06109ed90() {\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='f8c99b62c01e4e21b844aab06109ed90 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' f8c99b62c01e4e21b844aab06109ed90';\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_f8c99b62c01e4e21b844aab06109ed90()\"><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; R2014b<br><\/p>\r\n<\/div>\r\n<!--\r\nf8c99b62c01e4e21b844aab06109ed90 ##### 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\/37176-distribute-figures \"Distribute\r\n% Figures\"> by\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/259004\r\n% Anders Simonsen>.\r\n%\r\n% I must be obsessed with figure management, MATLAB figure that is. I've\r\n% previously Picked three File Exchange entries around this topic:\r\n% <https:\/\/blogs.mathworks.com\/pick\/2011\/01\/28\/cascade-your-figure-windows\/\r\n% |cascade|>, <https:\/\/blogs.mathworks.com\/pick\/2013\/04\/26\/toggle-that-fig\/\r\n% |togglefig|>, and\r\n% <https:\/\/blogs.mathworks.com\/pick\/2014\/07\/04\/manage-your-figures\/ Useful\r\n% Figure Management Utilities>. No wonder, I was drawn to this entry by\r\n% Anders. \r\n%\r\n% Have you ever generated lots of figures and wished you could quickly view\r\n% all of them on one screen?\r\n%\r\n% <<distfig_manyfigures.png>>\r\n%\r\n% Anders's |distFig| lets you do that. Let's say that you have four figure\r\n% windows.\r\n%\r\n%   logo\r\n%   figure\r\n%   surf(peaks)\r\n%   figure\r\n%   plot(rand(10,3))\r\n%   figure\r\n%   scatter3(rand(50,1),rand(50,1),rand(50,1))\r\n%\r\n% Just call |distFig|, and it distributes your figures on the screen. Pass\r\n% in some parameters to control how the figures are distributed.\r\n%\r\n%   distFig('Rows',2,'Columns',2)\r\n%\r\n% <<distfig_screenshot.png>>\r\n%\r\n% Anders provides detailed help with the function, as well as some sample\r\n% code demonstrating the various uses. I also appreciate his responsiveness\r\n% to <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/37176-distribute-figures#comments\r\n% user comments>. You can see that he quickly updated his entry to fix some\r\n% issues that came up in R2014b. Great stuff, Anders!\r\n%\r\n% *Comments*\r\n%\r\n% Give this a try and let us know what you think\r\n% <https:\/\/blogs.mathworks.com\/pick\/?p=5746#respond here> or leave a\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/37176-distribute-figures#comments\r\n% comment> for Anders.\r\n\r\n##### SOURCE END ##### f8c99b62c01e4e21b844aab06109ed90\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_distfig\/distfig_manyfigures.png\" onError=\"this.style.display ='none';\" \/><\/div><p>\r\n   Jiro's pick this week is \"Distribute Figures\" by Anders Simonsen.\r\n   \r\n   I must be obsessed with figure management, MATLAB figure that is. I've previously Picked three File Exchange entries... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2014\/12\/19\/distribute-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\/5746"}],"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=5746"}],"version-history":[{"count":5,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/5746\/revisions"}],"predecessor-version":[{"id":5753,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/5746\/revisions\/5753"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=5746"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=5746"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=5746"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}