{"id":2141,"date":"2008-05-02T11:13:16","date_gmt":"2008-05-02T16:13:16","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2008\/05\/02\/icon-editor\/"},"modified":"2016-05-10T15:20:42","modified_gmt":"2016-05-10T19:20:42","slug":"icon-editor","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2008\/05\/02\/icon-editor\/","title":{"rendered":"Icon Editor"},"content":{"rendered":"<div class=\"content\">\r\n\r\nBob's pick this week is <a title=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=19188&amp;objectType=file (link no longer works)\">IconEditor v1.4<\/a> by Elmar Tarajan. This tool could improve your MATLAB workflow more than you might think. Let me explain.\r\n\r\n&nbsp;\r\n\r\nIf you follow the <a href=\"https:\/\/blogs.mathworks.com\/desktop\">MATLAB Desktop blog<\/a> you may have noticed the <a href=\"https:\/\/blogs.mathworks.com\/community\/2007\/08\/20\/desktop-screenshot-gallery\/\">gallery of screenshots<\/a> provided by MATLAB users. Looking through them I noticed only a few took advantage of MATLAB Desktop Shortcuts. Considering\r\nhow much I rely on desktop shortcuts everyday I can only conclude that more users simply don't know about them yet. So you\r\nmight check out <a href=\"https:\/\/blogs.mathworks.com\/community\/2007\/03\/29\/shortcuts-for-commonly-used-code\/\">Kristin's post<\/a> and <a href=\"https:\/\/blogs.mathworks.com\/pick\/2006\/11\/06\/more-mini-videos\/\">Doug's video<\/a>.\r\n\r\nOne of the things I love about shortcuts is the flexibility. You can make shortcuts for just about anything. For example,\r\nI do a lot of interactive data exploration using all the constrained and unconstrained pan and zoom modes. (Note: To learn\r\nmore about MATLAB's pan and zoom capabilities check out <a href=\"https:\/\/blogs.mathworks.com\/community\/2007\/12\/10\/focused-on-zooming\/\">Dan's post<\/a> and <a href=\"https:\/\/blogs.mathworks.com\/pick\/2006\/11\/27\/linked-zoom-and-constrained-zoom-in-matlab\/\">Doug's video<\/a>.) Since I prefer toolbar buttons to menus I made shortcuts for each mode.\r\n\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/..\/..\/images\/pick\/iconeditor_shortcutslabeled_cropped.png\" alt=\"\" hspace=\"5\" vspace=\"5\" \/>\r\n\r\nYou can make your shortcut labels as descriptive or cryptic as you want. If your screen is not wide enough for all your shortcuts\r\nyou can save space by turning off the labels. Then, when your mouse pointer hovers over an icon its label appears as a tool\r\ntip. You can also choose icons that are as unique and intuitive as you want.\r\n\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/..\/..\/images\/pick\/iconeditor_shortcuticonsonly.png\" alt=\"\" hspace=\"5\" vspace=\"5\" \/>\r\n\r\nHow did I create <a title=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=19097&amp;objectType=file (link no longer works)\">those icons<\/a>? That's where Elmar's <a title=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=19188&amp;objectType=file (link no longer works)\">IconEditor<\/a> came in real handy. Those icons didn't exist anywhere to my knowledge so I just made my own, and you can too thanks to Elmar.\r\nThis is a simple but useful GUI that looks very nice for starters.\r\n\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/..\/..\/images\/pick\/iconeditor_screenshot.png\" alt=\"\" hspace=\"5\" vspace=\"5\" \/>\r\n\r\nThe help goes on to explain the command line options for loading image data in different formats for example. For those who\r\n\r\nenjoy looking inside M-files, the last subfunction, <tt>icondata<\/tt> contains the data behind its own icons such as the pencil and bucket. There are more useful features to be discovered, so\r\ncheck it out.\r\n\r\nHow could you use this editor and custom icons? Tell us about it <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=2141#respond\">here<\/a>.\r\n\r\n<script>\/\/ <![CDATA[\r\nfunction grabCode_9d7377269e0f47eaa425fe950d4d945c() {\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='9d7377269e0f47eaa425fe950d4d945c ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 9d7377269e0f47eaa425fe950d4d945c';\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 = 'Robert Bemis';\r\n        copyright = 'Copyright 2008 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('\r\n\r\n<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>\r\n\r\n\r\n\\n');\r\n      \r\n      d.title = title + ' (MATLAB code)';\r\n      d.close();\r\n      }\r\n\/\/ ]]><\/script>\r\n<p style=\"text-align: right; font-size: xx-small; font-weight: lighter; font-style: italic; color: gray;\">\r\n<a><span style=\"font-size: x-small; font-style: italic;\">Get\r\nthe MATLAB code\r\n<noscript>(requires JavaScript)<\/noscript><\/span><\/a>\r\n\r\nPublished with MATLAB\u00ae 7.6<\/p>\r\n\r\n<\/div>\r\n<!--\r\n9d7377269e0f47eaa425fe950d4d945c ##### SOURCE BEGIN #####\r\n%%\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadAuthor.do?objectId=969735&objectType=author % Bob>'s pick this week is\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=19188&objectType=file IconEditor v1.4>\r\n% by Elmar Tarajan. This tool could improve your MATLAB\r\n% workflow more than you might think. Let me explain.\r\n%%\r\n% If you follow the <https:\/\/blogs.mathworks.com\/desktop MATLAB Desktop % blog> you may have noticed the\r\n% <https:\/\/blogs.mathworks.com\/community\/2007\/08\/20\/desktop-screenshot-gallery\/ % gallery of screenshots> provided by MATLAB users. Looking through them I\r\n% noticed only a few took advantage of MATLAB Desktop Shortcuts. Considering\r\n% how much I rely on desktop shortcuts everyday I can only conclude that more\r\n% users simply don't know about them yet. So you might check out\r\n% <https:\/\/blogs.mathworks.com\/community\/2007\/03\/29\/shortcuts-for-commonly-used-code\/ % Kristin's post> and\r\n% <https:\/\/blogs.mathworks.com\/pick\/2006\/11\/06\/more-mini-videos\/ Doug's % video>.\r\n%%\r\n% One of the things I love about shortcuts is the flexibility. You can make\r\n% shortcuts for just about anything. For example, I do a lot of interactive\r\n% data exploration using all the constrained and unconstrained pan and zoom\r\n% modes. (Note: To learn more about MATLAB's pan and zoom capabilities check\r\n% out\r\n% <https:\/\/blogs.mathworks.com\/community\/2007\/12\/10\/focused-on-zooming\/ Dan's % post> and\r\n% <https:\/\/blogs.mathworks.com\/pick\/2006\/11\/27\/linked-zoom-and-constrained-zoom-in-matlab\/ % Doug's video>.) Since I prefer toolbar buttons to menus I made shortcuts\r\n% for each mode.\r\n%%\r\n% <<..\/images\/pick\/iconeditor_shortcutslabeled_cropped.png>>\r\n\r\n%%\r\n% You can make your shortcut labels as descriptive or cryptic as you want. If\r\n% your screen is not wide enough for all your shortcuts you can save space by\r\n% turning off the labels. Then, when your mouse pointer hovers over an icon\r\n% its label appears as a tool tip. You can also choose icons that are as\r\n% unique and intuitive as you want.\r\n%%\r\n% <<..\/images\/pick\/iconeditor_shortcuticonsonly.png>>\r\n%%\r\n% How did I create\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=19097&objectType=file % those icons>? That's where Elmar's\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=19188&objectType=file % IconEditor> came in real handy. Those icons didn't exist anywhere to\r\n% my knowledge so I just made my own, and you can too thanks to Elmar. This\r\n% is a simple but useful GUI that looks very nice for starters.\r\n%%\r\n% <<..\/images\/pick\/iconeditor_screenshot.png>>\r\n%%\r\n% Talk about workflow: the screen shot does a wonderful job of communicating\r\n% how to use the tool.\r\n%%\r\n% <<https:\/\/www.mathworks.com\/matlabcentral\/files\/19188\/final.png>>\r\n%%\r\n% The help goes on\r\n% to explain the command line options for loading image data in different\r\n% formats for example. For those who enjoy looking inside M-files, the last\r\n% subfunction, |icondata| contains the data behind its own icons such as the\r\n% pencil and bucket. There are more useful features to be discovered, so check\r\n% it out.\r\n%%\r\n% How could you use this editor and custom icons? Tell us about it\r\n% <https:\/\/blogs.mathworks.com\/pick\/?p=2141#respond here>.\r\n\r\n##### SOURCE END ##### 9d7377269e0f47eaa425fe950d4d945c\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n\r\nBob's pick this week is IconEditor v1.4 by Elmar Tarajan. This tool could improve your MATLAB workflow more than you might think. Let me explain.\r\n\r\n&nbsp;\r\n\r\nIf you follow the MATLAB Desktop... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2008\/05\/02\/icon-editor\/\">read more >><\/a><\/p>","protected":false},"author":46,"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\/2141"}],"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\/46"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=2141"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2141\/revisions"}],"predecessor-version":[{"id":7114,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2141\/revisions\/7114"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=2141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=2141"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=2141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}