{"id":4769,"date":"2013-08-23T09:00:49","date_gmt":"2013-08-23T13:00:49","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/?p=4769"},"modified":"2013-12-05T13:59:19","modified_gmt":"2013-12-05T18:59:19","slug":"schemaball","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2013\/08\/23\/schemaball\/","title":{"rendered":"Schemaball"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <introduction>\r\n      <p><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/answers\/contributors\/3208495\">Sean<\/a>'s pick this week is <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/42279-okomarov-schemaball\">Schemaball<\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/61651\">Oleg Komarov<\/a>.\r\n      <\/p>\r\n      <p>I was reading <a href=\"https:\/\/blogs.mathworks.com\/cleve\/2013\/06\/10\/lake-arrowhead-coauthor-graph\/\">Cleve's post<\/a> a few months ago about the Lake Arrowhead Coauthor Graph and saw a comment that mentioned an SO thread on schemaballs.  This\r\n         was an interesting read and it was neat to see how this thread inspired the FEX entry.\r\n      <\/p>\r\n   <\/introduction>\r\n   <h3>Intro to Schemaball<a name=\"1\"><\/a><\/h3>\r\n   <p>Oleg's <tt>schemaball<\/tt> allows you to plot correlation matrices as schemaballs with optional labels and colors.  Additionally, it passes back the\r\n      handles so you can make any other changes after creating it.  He provides a good help section and some examples as well as\r\n      defaults.  I also appreciated the \"See Also\" section where Oleg points to <a href=\"\"><tt>corrplot<\/tt><\/a>, a function I'd never heard of before about three minutes ago!\r\n   <\/p>\r\n   <p>Here, is an example that uses <a href=\"\"><tt>gallery<\/tt><\/a>'s <i>'randcorr'<\/i> option to generate a random correlation matrix:\r\n   <\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">h = schemaball(gallery(<span style=\"color: #A020F0\">'randcorr'<\/span>,18),[],[1 0.25 0; 1 1 0.125],[0.8 0 0.8]);\r\nset(h.l(~isnan(h.l)), <span style=\"color: #A020F0\">'LineWidth'<\/span>,2)<\/pre><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/guest\/main\/schemaball.png\"> <\/p>\r\n   <h3>MATLAB Unit Testing Framework<a name=\"2\"><\/a><\/h3>\r\n   <p>The reason I picked this file isn't actually because of the schemaball. Oleg included, along with the schemaball, a schemaballUnit\r\n      unit testing class that uses R2013a's new <a href=\"\">MATLAB unit testing framework<\/a>.  Having used this framework a fair amount now, this caught my attention.  It was the first (and to my knowledge, only) file\r\n      on the FEX to use the new framework.\r\n   <\/p>\r\n   <p>Let's see it in action:<\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">TestSB  = schemaballUnit; <span style=\"color: #228B22\">%Schemaball test object<\/span>\r\nResults = run(TestSB)     <span style=\"color: #228B22\">%Run it and retrieve results<\/span><\/pre><pre style=\"font-style:oblique\">Running schemaballUnit\r\n.\r\nDone schemaballUnit\r\n__________\r\n\r\nResults = \r\n  TestResult with properties:\r\n\r\n          Name: 'schemaballUnit\/verifyErrorsWarnings'\r\n        Passed: 1\r\n        Failed: 0\r\n    Incomplete: 0\r\n      Duration: 0.1482\r\nTotals:\r\n   1 Passed, 0 Failed, 0 Incomplete.\r\n   0.14818 seconds testing time.\r\n<\/pre><h3>Comments<a name=\"3\"><\/a><\/h3>\r\n   <p>Let us know what you think <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=4769#respond\">here<\/a> or leave a <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/42279-okomarov-schemaball#comments\">comment<\/a> for Oleg.\r\n   <\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_afbf3ee18ef84e9183f12e5c3b09d48e() {\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='afbf3ee18ef84e9183f12e5c3b09d48e ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' afbf3ee18ef84e9183f12e5c3b09d48e';\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 = 'guest';\r\n        copyright = 'Copyright 2013 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_afbf3ee18ef84e9183f12e5c3b09d48e()\"><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; R2013a<br><\/p>\r\n<\/div>\r\n<!--\r\nafbf3ee18ef84e9183f12e5c3b09d48e ##### SOURCE BEGIN #####\r\n%% Schemaball\r\n%\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/answers\/contributors\/3208495 Sean>'s pick this week is\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/42279-okomarov-schemaball\r\n% Schemaball> by\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/61651 Oleg\r\n% Komarov>.\r\n%\r\n% I was reading <https:\/\/blogs.mathworks.com\/cleve\/2013\/06\/10\/lake-arrowhead-coauthor-graph\/ Cleve's post> a few months ago about the Lake Arrowhead\r\n% Coauthor Graph and saw a comment that mentioned an SO thread on\r\n% schemaballs.  This was an interesting read and it was neat to see how\r\n% this thread inspired the FEX entry.\r\n% \r\n\r\n%% Intro to Schemaball\r\n%\r\n% Oleg's |schemaball| allows you to plot correlation matrices as\r\n% schemaballs with optional labels and colors.  Additionally, it passes\r\n% back the handles so you can make any other changes after creating it.  He\r\n% provides a good help section and some examples as well as defaults.  I\r\n% also appreciated the \"See Also\" section where Oleg points to\r\n% <\r\n% |corrplot|>, a function I'd never heard of before about three minutes\r\n% ago!\r\n% \r\n% Here, is an example that uses\r\n% <\r\n% |gallery|>'s _'randcorr'_ option to generate a random correlation matrix:\r\n%\r\n%   h = schemaball(gallery('randcorr',18),[],[1 0.25 0; 1 1 0.125],[0.8 0 0.8]);\r\n%   set(h.l(~isnan(h.l)), 'LineWidth',2)\r\n%\r\n% <<schemaball.png>>\r\n\r\n%% MATLAB Unit Testing Framework\r\n%\r\n% The reason I picked this file isn't actually because of the schemaball.\r\n% Oleg included, along with the schemaball, a schemaballUnit unit testing\r\n% class that uses R2013a's new\r\n% <\r\n% MATLAB unit testing framework>.  Having used this framework a fair amount\r\n% now, this caught my attention.  It was the first (and to my knowledge,\r\n% only) file on the FEX to use the new framework.\r\n%\r\n% Let's see it in action:\r\n\r\nTestSB  = schemaballUnit; %Schemaball test object\r\nResults = run(TestSB)     %Run it and retrieve results\r\n\r\n%% Comments\r\n% \r\n% Let us know what you think \r\n% <https:\/\/blogs.mathworks.com\/pick\/?p=4769#respond here> or leave a\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/42279-okomarov-schemaball#comments comment> for Oleg.\r\n% \r\n##### SOURCE END ##### afbf3ee18ef84e9183f12e5c3b09d48e\r\n-->","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/guest\/main\/schemaball.png\" onError=\"this.style.display ='none';\" \/><\/div><p>\r\n   \r\n      Sean's pick this week is Schemaball by Oleg Komarov.\r\n      \r\n      I was reading Cleve's post a few months ago about the Lake Arrowhead Coauthor Graph and saw a comment that... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2013\/08\/23\/schemaball\/\">read more >><\/a><\/p>","protected":false},"author":87,"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\/4769"}],"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\/87"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=4769"}],"version-history":[{"count":9,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/4769\/revisions"}],"predecessor-version":[{"id":4949,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/4769\/revisions\/4949"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=4769"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=4769"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=4769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}