{"id":6539,"date":"2020-12-23T10:16:29","date_gmt":"2020-12-23T15:16:29","guid":{"rendered":"https:\/\/blogs.mathworks.com\/cleve\/?p=6539"},"modified":"2021-01-05T12:55:52","modified_gmt":"2021-01-05T17:55:52","slug":"holiday-greetings-2020","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/cleve\/2020\/12\/23\/holiday-greetings-2020\/","title":{"rendered":"Holiday Greetings 2020"},"content":{"rendered":"\r\n<div class=\"content\"><!--introduction--><p>I want to share some colorful images featuring the seven colors in the MATLAB axes color order.<\/p><!--\/introduction--><h3>Contents<\/h3><div><ul><li><a href=\"#09f537d1-5fd0-4568-87b3-abfa7993fde4\">Color order<\/a><\/li><li><a href=\"#cf52bfe0-b6c1-42ba-b686-c4108673cf06\">Name that color<\/a><\/li><li><a href=\"#824f5f82-630c-407d-b5e8-2c9791ff0d79\">Line plots<\/a><\/li><li><a href=\"#4eea1281-3df2-4874-8f2f-9d104622926c\">Franklin's magic<\/a><\/li><li><a href=\"#10d55d7d-e5f3-4122-99b9-c85af1328bc2\">'Tis the season<\/a><\/li><\/ul><\/div><h4>Color order<a name=\"09f537d1-5fd0-4568-87b3-abfa7993fde4\"><\/a><\/h4><pre class=\"codeinput\">   show_rgb(get(gca,<span class=\"string\">'colororder'<\/span>))\r\n<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/xmas2020_blog_01.png\" alt=\"\"> <h4>Name that color<a name=\"cf52bfe0-b6c1-42ba-b686-c4108673cf06\"><\/a><\/h4><p>The <a href=\"https:\/\/www.sherwin-williams.com\/visualizer#\/active\/colors\">Sherman-Williams Visualizer<\/a> provides names for these colors.<\/p><pre>  Blue Chip\r\n  Obstinate Orange\r\n  Gusto Gold\r\n  Fabulous Grape\r\n  Overt Green\r\n  Fountain\r\n  Real Red<\/pre><h4>Line plots<a name=\"824f5f82-630c-407d-b5e8-2c9791ff0d79\"><\/a><\/h4><p>MATLAB cycles through the colors for line plots and other graphics objects.<\/p><pre class=\"codeinput\">  close\r\n  set(gcf,<span class=\"string\">'pos'<\/span>,[200 200 480 360])\r\n  x = 7*(0:.01:1);\r\n  y = (-1:1\/3:1)';\r\n  plot(x,x.*sin(x-y),<span class=\"string\">'linewidth'<\/span>,2)\r\n<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/xmas2020_blog_02.png\" alt=\"\"> <h4>Franklin's magic<a name=\"4eea1281-3df2-4874-8f2f-9d104622926c\"><\/a><\/h4><p>Benjamin Franklin was one of the Founding Fathers of the United States. Among his many achievements is the creation of two <i>semimagic squares<\/i>. They are only semimagic because the diagonals don't have the magic sum. For the matrices, <a href=\"https:\/\/blogs.mathworks.com\/cleve\/files\/franklin.m\">see franklin<\/a>.<\/p><p>Describing his work in 1771, Franklin wrote, \"I was at length tired with sitting there to hear debates, in which, as clerk, I could take no part, and which were often so unentertaining that I was induc'd to amuse myself with making magic squares or circles\".<\/p><p>Ignoring their numeric properties, Ned Gulley viewed the Franklin squares with the <tt>area<\/tt> function and our seven colors.<\/p><pre class=\"codeinput\">  close\r\n  area(franklin(8))\r\n  axis <span class=\"string\">tight<\/span> <span class=\"string\">square<\/span> <span class=\"string\">off<\/span>\r\n<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/xmas2020_blog_03.png\" alt=\"\"> <pre class=\"codeinput\">  area(franklin(16))\r\n  axis <span class=\"string\">tight<\/span> <span class=\"string\">square<\/span> <span class=\"string\">off<\/span>\r\n<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/xmas2020_blog_04.png\" alt=\"\"> <h4>'Tis the season<a name=\"10d55d7d-e5f3-4122-99b9-c85af1328bc2\"><\/a><\/h4><p>Here is a revision of <a href=\"https:\/\/blogs.mathworks.com\/cleve\/2019\/12\/24\/christmas-greetings-2019\">last year's greeting<\/a>, replacing the primary colors.<\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/candles_2020.gif\" alt=\"\"> <\/p><p>Code available at <a href=\"https:\/\/blogs.mathworks.com\/cleve\/files\/candles_2020.m\">candles_2020<\/a>.<\/p><script language=\"JavaScript\"> <!-- \r\n    function grabCode_392ceee2090943618ccf018eaddd48a4() {\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='392ceee2090943618ccf018eaddd48a4 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 392ceee2090943618ccf018eaddd48a4';\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        copyright = 'Copyright 2021 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 copyright line at the bottom if specified.\r\n        if (copyright.length > 0) {\r\n            d.writeln('');\r\n            d.writeln('%%');\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     --> <\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_392ceee2090943618ccf018eaddd48a4()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n      the MATLAB code <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; R2020a<br><\/p><\/div><!--\r\n392ceee2090943618ccf018eaddd48a4 ##### SOURCE BEGIN #####\r\n%% Holiday Greetings 2020\r\n% I want to share some colorful images featuring the seven\r\n% colors in the MATLAB axes color order.\r\n\r\n%% Color order\r\n\r\n   show_rgb(get(gca,'colororder'))\r\n   \r\n%% Name that color\r\n% The\r\n% <https:\/\/www.sherwin-williams.com\/visualizer#\/active\/colors\r\n% Sherman-Williams Visualizer> provides names for these colors.\r\n%\r\n%    Blue Chip\r\n%    Obstinate Orange\r\n%    Gusto Gold\r\n%    Fabulous Grape\r\n%    Overt Green\r\n%    Fountain\r\n%    Real Red\r\n \r\n%% Line plots\r\n% MATLAB cycles through the colors for line plots and other graphics\r\n% objects.\r\n   \r\n  close\r\n  set(gcf,'pos',[200 200 480 360])\r\n  x = 7*(0:.01:1);\r\n  y = (-1:1\/3:1)';\r\n  plot(x,x.*sin(x-y),'linewidth',2) \r\n  \r\n%% Franklin's magic\r\n% Benjamin Franklin was one of the Founding Fathers of the United States.\r\n% Among his many achievements is the creation of two _semimagic squares_.\r\n% They are only semimagic because the diagonals don't have the magic sum.\r\n% For the matrices, <https:\/\/blogs.mathworks.com\/cleve\/files\/franklin.m \r\n% see franklin>.\r\n%\r\n% Describing his work in 1771, Franklin wrote, \"I was at length\r\n% tired with sitting there to hear debates, in which, as clerk, I could\r\n% take no part, and which were often so unentertaining that I was\r\n% induc'd to amuse myself with making magic squares or circles\".\r\n%\r\n% Ignoring their numeric properties, Ned Gulley viewed the Franklin \r\n% squares with the |area| function and our seven colors.\r\n\r\n  close\r\n  area(franklin(8))\r\n  axis tight square off\r\n  \r\n%%\r\n\r\n  area(franklin(16))\r\n  axis tight square off\r\n\r\n%% 'Tis the season\r\n% Here is a revision of\r\n% <https:\/\/blogs.mathworks.com\/cleve\/2019\/12\/24\/christmas-greetings-2019\r\n% last year's greeting>, replacing the primary colors.\r\n%\r\n% <<candles_2020.gif>>\r\n%\r\n% Code available at <https:\/\/blogs.mathworks.com\/cleve\/files\/candles_2020.m \r\n% candles_2020>.\r\n\r\n##### SOURCE END ##### 392ceee2090943618ccf018eaddd48a4\r\n-->","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/colors-1.png\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div><!--introduction--><p>I want to share some colorful images featuring the seven colors in the MATLAB axes color order.... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/cleve\/2020\/12\/23\/holiday-greetings-2020\/\">read more >><\/a><\/p>","protected":false},"author":78,"featured_media":6557,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[32,23,4,9],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/6539"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/users\/78"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/comments?post=6539"}],"version-history":[{"count":3,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/6539\/revisions"}],"predecessor-version":[{"id":6575,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/6539\/revisions\/6575"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/media\/6557"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/media?parent=6539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/categories?post=6539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/tags?post=6539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}