{"id":2362,"date":"2017-03-06T12:00:30","date_gmt":"2017-03-06T17:00:30","guid":{"rendered":"https:\/\/blogs.mathworks.com\/cleve\/?p=2362"},"modified":"2017-03-06T08:16:05","modified_gmt":"2017-03-06T13:16:05","slug":"lake-arrowhead-coauthor-graph-revisited","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/cleve\/2017\/03\/06\/lake-arrowhead-coauthor-graph-revisited\/","title":{"rendered":"Lake Arrowhead Coauthor Graph Revisited"},"content":{"rendered":"\r\n<div class=\"content\"><!--introduction--><p>The Lake Arrowhead Coauthor Graph came out of the Householder XII conference in 1993 at the UCLA conference center in the mountains north of San Bernardino.  John Gilbert now remembers it as one of the first computational social network analyses he had ever seen. Today I revisit it using the new MATLAB graph object.<\/p><!--\/introduction--><h3>Contents<\/h3><div><ul><li><a href=\"#c2570461-c48e-4df1-9a97-ccffa04e78a8\">Coauthor Graph<\/a><\/li><li><a href=\"#96e279f3-c721-48b1-bbeb-57fc5062288d\">The Data<\/a><\/li><li><a href=\"#004a6a36-dd80-4b5d-b174-87d23672c3ba\">Reverse Cuthill-McGee<\/a><\/li><li><a href=\"#27670148-6cee-43c0-a64a-cf933f6413d1\">Circle Layout<\/a><\/li><li><a href=\"#ddfb2b0b-3e9f-482d-a223-a37e838064a3\">Node Names<\/a><\/li><li><a href=\"#9f181bb5-c7e5-450d-82e0-1fa9d6d93f81\">Three-Dimensional Layout<\/a><\/li><li><a href=\"#66bdb312-b26a-447f-b0f7-2912e296274b\">Moler's Coauthors<\/a><\/li><li><a href=\"#19eb65f3-3860-4360-8898-a8a2ea4e86e2\">Center<\/a><\/li><li><a href=\"#b83cfa8b-3e83-4681-9687-883868bb5e1e\">Zoom<\/a><\/li><li><a href=\"#59486468-c17f-4de3-bbf3-9898c2fd397b\">Animation<\/a><\/li><li><a href=\"#388864ba-74cf-48b4-bc50-50bbe0519464\">arrowhead_adjacency.m<\/a><\/li><li><a href=\"#29cc00d9-e69c-49fe-9099-326efdc14781\">arrowhead_names.m<\/a><\/li><li><a href=\"#01bb7b30-4688-414f-af9f-3ed6e089f5fd\">Thanks<\/a><\/li><\/ul><\/div><h4>Coauthor Graph<a name=\"c2570461-c48e-4df1-9a97-ccffa04e78a8\"><\/a><\/h4><p>I wrote a <a href=\"https:\/\/blogs.mathworks.com\/cleve\/2013\/06\/10\/lake-arrowhead-coauthor-graph\/\">blog post<\/a> about the Lake Arrowhead Coauthor Graph a couple of years ago.<\/p><p>At the Householder XII conference in 1993 Nick Trefethen posted a flip chart with Gene Golub's name in the center. He invited everyone present to add their name to the chart and draw lines connecting their name with the names of all their coauthors.  The diagram grew denser throughout the week.  At the end of the conference it was a graph with 104 vertices (or people) and 211 edges.<\/p><p>Nick framed the original chart and has it on the wall of his office at Oxford.  Another Nick, Nick Hale, took <a href=\"https:\/\/blogs.mathworks.com\/cleve\/2013\/06\/15\/lake-arrowhead-coauthor-graph-photos\">this photo<\/a>.<\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/mg4872.jpg\" alt=\"\"> <\/p><h4>The Data<a name=\"96e279f3-c721-48b1-bbeb-57fc5062288d\"><\/a><\/h4><p>John Gilbert, Rob Schreiber and I entered the names and coauthor connections into MATLAB, creating an adjacency matrix <tt>A<\/tt>. For a long time the data was available as a <tt>.mat<\/tt> file from John's old web site at Xerox PARC.  But John left PARC years ago, so I am now making the data available in human-readable form at the end of this blog post.  There are two files.<\/p><pre class=\"codeinput\">   A = arrowhead_adjacency;\r\n   names = arrowhead_names;\r\n<\/pre><h4>Reverse Cuthill-McGee<a name=\"004a6a36-dd80-4b5d-b174-87d23672c3ba\"><\/a><\/h4><p>The ordering of the authors in the original data is determined by how we happened to read them off the flip chart.  Golub is first, and has the most connections to other authors.  A symmetric reverse Cuthill-McGee ordering of the rest of the nodes puts coauthors near each other and reduces the band width of the adjacency matrix.<\/p><pre class=\"codeinput\">   r = [1 symrcm(A(2:end,2:end))+1];\r\n   A = A(r,r);\r\n   names = names(r);\r\n   spy(A)\r\n<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/arrowhead2_01.png\" alt=\"\"> <h4>Circle Layout<a name=\"27670148-6cee-43c0-a64a-cf933f6413d1\"><\/a><\/h4><p>Let's make a MATLAB graph and plot it with the <tt>circle<\/tt> layout. By default, the <tt>graph\/plot<\/tt> method omits the node names if there are more than 100 of them.  This removes clutter and is usually a good idea. The resulting unannotated circle layout is a pretty picture, but not very informative.<\/p><p>The RCM ordering places most of the graph edges, except those connecting to Golub, near the circumference of the circle.<\/p><pre class=\"codeinput\">   G = graph(A,names);\r\n   plot(G,<span class=\"string\">'layout'<\/span>,<span class=\"string\">'circle'<\/span>)\r\n   axis <span class=\"string\">square<\/span>\r\n<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/arrowhead2_02.png\" alt=\"\"> <h4>Node Names<a name=\"ddfb2b0b-3e9f-482d-a223-a37e838064a3\"><\/a><\/h4><p>Move Golub to the center.<\/p><pre class=\"codeinput\">   p = plot(G,<span class=\"string\">'Layout'<\/span>,<span class=\"string\">'circle'<\/span>);\r\n   idGolub = findnode(G,<span class=\"string\">'Golub'<\/span>);\r\n   p.XData(idGolub) = 0;\r\n   p.YData(idGolub) = 0;\r\n   axis <span class=\"string\">square<\/span>\r\n<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/arrowhead2_03.png\" alt=\"\"> <p>Placing the rest of the names around the outside of the circle requires some custom processing.<\/p><pre class=\"codeinput\">   axis <span class=\"string\">off<\/span>\r\n   t = text(p.XData,p.YData,names);\r\n   theta = linspace(0,360,numel(t)+1);\r\n   <span class=\"keyword\">for<\/span> k = 1:numel(t)\r\n       t(k).Rotation = theta(k);\r\n       t(k).String = [blanks(4) t(k).String];\r\n       t(k).FontSize = 8;\r\n   <span class=\"keyword\">end<\/span>\r\n<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/arrowhead2_04.png\" alt=\"\"> <p>This plot can now be compared with <a href=\"https:\/\/blogs.mathworks.com\/cleve\/2013\/06\/10\/lake-arrowhead-coauthor-graph\/\">the plot<\/a> we originally produced at Householder XII.<\/p><h4>Three-Dimensional Layout<a name=\"9f181bb5-c7e5-450d-82e0-1fa9d6d93f81\"><\/a><\/h4><p>In this two-dimensional circle plot it's nearly impossible to follow the links from one author to his or her coauthors.  'Moler' is at about 5 o'clock on the circle.  What is the degree of my node?  Who are my coauthors?<\/p><p>A three-dimensional layout and judicious use of the mouse in conjunction with <tt>cameratoolbar<\/tt> makes it possible to examine this graph in detail.<\/p><pre class=\"codeinput\">   p = plot(G,<span class=\"string\">'layout'<\/span>,<span class=\"string\">'force3'<\/span>,<span class=\"string\">'nodelabelmode'<\/span>,<span class=\"string\">'auto'<\/span>);\r\n   <span class=\"comment\">% Setting the nodelabelmode says include all of the names.<\/span>\r\n   axis <span class=\"string\">off<\/span> <span class=\"string\">vis3d<\/span>\r\n   set(gca,<span class=\"string\">'clipping'<\/span>,<span class=\"string\">'off'<\/span>)\r\n   zoom(2)\r\n   gif_frame(<span class=\"string\">'arrowhead_name.gif'<\/span>)\r\n   gif_frame(2)\r\n<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/arrowhead2_05.png\" alt=\"\"> <h4>Moler's Coauthors<a name=\"66bdb312-b26a-447f-b0f7-2912e296274b\"><\/a><\/h4><p>Let's highlight me and my coauthors.<\/p><pre class=\"codeinput\">   me = findnode(G,<span class=\"string\">'Moler'<\/span>)\r\n   friends = neighbors(G,me)'\r\n   color = get(gca,<span class=\"string\">'colororder'<\/span>);\r\n   highlight(p,[me friends],<span class=\"string\">'nodecolor'<\/span>,color(2,:),<span class=\"string\">'markersize'<\/span>,6)\r\n   highlight(p,me,friends,<span class=\"string\">'edgecolor'<\/span>,color(2,:),<span class=\"string\">'linewidth'<\/span>,2)\r\n   gif_frame(2)\r\n<\/pre><pre class=\"codeoutput\">me =\r\n    88\r\nfriends =\r\n    61    62    63    68    75    77    89    98\r\n<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/arrowhead2_06.png\" alt=\"\"> <h4>Center<a name=\"19eb65f3-3860-4360-8898-a8a2ea4e86e2\"><\/a><\/h4><p>Make my node the center of this little universe.<\/p><pre class=\"codeinput\">   set(p,<span class=\"string\">'xdata'<\/span>,p.XData - p.XData(me), <span class=\"keyword\">...<\/span>\r\n         <span class=\"string\">'ydata'<\/span>,p.YData - p.YData(me), <span class=\"keyword\">...<\/span>\r\n         <span class=\"string\">'zdata'<\/span>,p.ZData - p.ZData(me))\r\n   gif_frame(2)\r\n<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/arrowhead2_07.png\" alt=\"\"> <h4>Zoom<a name=\"b83cfa8b-3e83-4681-9687-883868bb5e1e\"><\/a><\/h4><p>Now zoom and rotate. This is much better done in person with <tt>cameratoolbar<\/tt>. The best we can do in this blog is an animated gif.<\/p><pre class=\"codeinput\">   <span class=\"comment\">% Zoom<\/span>\r\n   <span class=\"keyword\">for<\/span> k = 1:4\r\n       zoom(sqrt(2))\r\n       gif_frame\r\n   <span class=\"keyword\">end<\/span>\r\n\r\n   <span class=\"comment\">% Rotate<\/span>\r\n   [a,e] = view;\r\n   <span class=\"keyword\">for<\/span> k = 1:4\r\n       view(a,e-12*k)\r\n       gif_frame\r\n   <span class=\"keyword\">end<\/span>\r\n   gif_frame(5)\r\n<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/arrowhead2_08.png\" alt=\"\"> <h4>Animation<a name=\"59486468-c17f-4de3-bbf3-9898c2fd397b\"><\/a><\/h4><p>Here is the animated .gif centered on me and my coauthors.<\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/arrowhead_moler.gif\" alt=\"\"> <\/p><p>And here we zoom in on Paul VanDooren by replacing<\/p><pre>  me = findnode(G,'Moler')<\/pre><p>with<\/p><pre>  me = findnode(G,'VanDooren')<\/pre><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/arrowhead_vandooren.gif\" alt=\"\"> <\/p><h4>arrowhead_adjacency.m<a name=\"388864ba-74cf-48b4-bc50-50bbe0519464\"><\/a><\/h4><pre class=\"codeinput\">   <span class=\"keyword\">function<\/span> A = arrowhead_adjacency\r\n     k = [ 1  1   1   1   1   3   3   1   1   1   1   2   3   3  38   1   2 <span class=\"keyword\">...<\/span>\r\n     32  42   3  32  42  43  44  44   1  46   1   1  37  13  49   1  32   1 <span class=\"keyword\">...<\/span>\r\n     44  53   1  53  44  45  54   1   1  20  41  44   1  39  52  60  15  58 <span class=\"keyword\">...<\/span>\r\n     61   3  63  41  43   1  15  35  51  61  41  43  59  65  53   3  58  63 <span class=\"keyword\">...<\/span>\r\n     42   1  41  44   1  46  47   1  10  15  32  35  62  66   2  19  39  58 <span class=\"keyword\">...<\/span>\r\n     61  66  69  37  53   1   9  72  42   8  21  32  42  77   1   7  15  46 <span class=\"keyword\">...<\/span>\r\n     47  49   6  42  66   1   3  25  41  43  59  65  67  80  33  52  59  27 <span class=\"keyword\">...<\/span>\r\n     28  46  74  31  51  46   1  22  23  24  25  35  41  52  81   3  21  55 <span class=\"keyword\">...<\/span>\r\n     60  44  58  62   4  17  12  19  23  72  77  89   1  23  86   1  23  86 <span class=\"keyword\">...<\/span>\r\n     91   4  72  90  19  90  48   1  18  25  77  82  86  17  52  66  86  89 <span class=\"keyword\">...<\/span>\r\n     16  32  34  58  66  80  81   1  34  74  77  14  82  77  79  49 102  26 <span class=\"keyword\">...<\/span>\r\n     32  39  44  48  51  52  56  63  69  74  78  81  83  90];\r\n\r\n     j = [ 2  3   5  10  11  29  30  32  34  35  36  36  38  40  40  41  42 <span class=\"keyword\">...<\/span>\r\n     42  43  44  44  44  44  45  46  47  47  48  49  49  50  50  51  51  53 <span class=\"keyword\">...<\/span>\r\n     54  54  55  55  56  56  57  58  59  59  59  59  60  60  60  61  62  62 <span class=\"keyword\">...<\/span>\r\n     62  63  64  65  65  66  66  66  66  66  67  67  67  67  68  69  69  69 <span class=\"keyword\">...<\/span>\r\n     70  71  71  71  72  72  72  73  73  73  73  73  73  73  74  74  74  74 <span class=\"keyword\">...<\/span>\r\n     74  74  74  75  75  76  76  76  77  78  78  78  78  78  79  79  79  79 <span class=\"keyword\">...<\/span>\r\n     79  79  80  80  80  81  81  81  81  81  81  81  81  81  82  82  82  83 <span class=\"keyword\">...<\/span>\r\n     83  83  83  84  84  85  86  86  86  86  86  86  86  86  86  87  87  87 <span class=\"keyword\">...<\/span>\r\n     87  88  88  88  89  89  90  90  90  90  90  90  91  91  91  92  92  92 <span class=\"keyword\">...<\/span>\r\n     92  93  93  93  94  94  95  96  96  96  96  96  96  97  97  97  97  97 <span class=\"keyword\">...<\/span>\r\n     98  98  98  98  98  98  98  99  99  99  99 100 100 101 102 103 103 104 <span class=\"keyword\">...<\/span>\r\n     104 104 104 104 104 104 104 104 104 104 104 104 104 104];\r\n\r\n     U = sparse(k,j,1,104,104);\r\n     A = logical(U + U');\r\n  <span class=\"keyword\">end<\/span>\r\n<\/pre><h4>arrowhead_names.m<a name=\"29cc00d9-e69c-49fe-9099-326efdc14781\"><\/a><\/h4><pre class=\"codeinput\">  <span class=\"keyword\">function<\/span> names = arrowhead_names\r\n    names = {<span class=\"string\">'Golub'<\/span>, <span class=\"string\">'Wilkinson'<\/span>, <span class=\"string\">'TChan'<\/span>, <span class=\"string\">'He'<\/span>, <span class=\"string\">'Varah'<\/span>, <span class=\"string\">'Kenney'<\/span>, <span class=\"keyword\">...<\/span>\r\n    <span class=\"string\">'Ashby'<\/span>, <span class=\"string\">'LeBorne'<\/span>, <span class=\"string\">'Modersitzki'<\/span>, <span class=\"string\">'Overton'<\/span>, <span class=\"string\">'Ernst'<\/span>, <span class=\"string\">'Borges'<\/span>, <span class=\"keyword\">...<\/span>\r\n    <span class=\"string\">'Kincaid'<\/span>, <span class=\"string\">'Crevelli'<\/span>, <span class=\"string\">'Boley'<\/span>, <span class=\"string\">'Anjos'<\/span>, <span class=\"string\">'Byers'<\/span>, <span class=\"string\">'Benzi'<\/span>, <span class=\"string\">'Kaufman'<\/span>, <span class=\"keyword\">...<\/span>\r\n    <span class=\"string\">'Gu'<\/span>, <span class=\"string\">'Fierro'<\/span>, <span class=\"string\">'Nagy'<\/span>, <span class=\"string\">'Harrod'<\/span>, <span class=\"string\">'Pan'<\/span>, <span class=\"string\">'Funderlic'<\/span>, <span class=\"string\">'Edelman'<\/span>, <span class=\"keyword\">...<\/span>\r\n    <span class=\"string\">'Cullum'<\/span>, <span class=\"string\">'Strakos'<\/span>, <span class=\"string\">'Saied'<\/span>, <span class=\"string\">'Ong'<\/span>, <span class=\"string\">'Wold'<\/span>, <span class=\"string\">'VanLoan'<\/span>, <span class=\"keyword\">...<\/span>\r\n    <span class=\"string\">'Chandrasekaran'<\/span>, <span class=\"string\">'Saunders'<\/span>, <span class=\"string\">'Bojanczyk'<\/span>, <span class=\"string\">'Dubrulle'<\/span>, <span class=\"string\">'Marek'<\/span>, <span class=\"keyword\">...<\/span>\r\n    <span class=\"string\">'Kuo'<\/span>, <span class=\"string\">'Bai'<\/span>, <span class=\"string\">'Tong'<\/span>, <span class=\"string\">'George'<\/span>, <span class=\"string\">'Moler'<\/span>, <span class=\"string\">'Gilbert'<\/span>, <span class=\"string\">'Schreiber'<\/span>, <span class=\"keyword\">...<\/span>\r\n    <span class=\"string\">'Pothen'<\/span>, <span class=\"string\">'NTrefethen'<\/span>, <span class=\"string\">'Nachtigal'<\/span>, <span class=\"string\">'Kahan'<\/span>, <span class=\"string\">'Varga'<\/span>, <span class=\"string\">'Young'<\/span>, <span class=\"keyword\">...<\/span>\r\n    <span class=\"string\">'Kagstrom'<\/span>, <span class=\"string\">'Barlow'<\/span>, <span class=\"string\">'Widlund'<\/span>, <span class=\"string\">'Bjorstad'<\/span>, <span class=\"string\">'OLeary'<\/span>, <span class=\"string\">'NHigham'<\/span>, <span class=\"keyword\">...<\/span>\r\n    <span class=\"string\">'Boman'<\/span>, <span class=\"string\">'Bjorck'<\/span>, <span class=\"string\">'Eisenstat'<\/span>, <span class=\"string\">'Zha'<\/span>, <span class=\"string\">'VanHuffel'<\/span>, <span class=\"string\">'Park'<\/span>, <span class=\"string\">'Arioli'<\/span>, <span class=\"keyword\">...<\/span>\r\n    <span class=\"string\">'MuntheKaas'<\/span>, <span class=\"string\">'Ng'<\/span>, <span class=\"string\">'VanDooren'<\/span>, <span class=\"string\">'Liu'<\/span>, <span class=\"string\">'Smith'<\/span>, <span class=\"string\">'Duff'<\/span>, <span class=\"string\">'Henrici'<\/span>, <span class=\"keyword\">...<\/span>\r\n    <span class=\"string\">'Tang'<\/span>, <span class=\"string\">'Reichel'<\/span>, <span class=\"string\">'Luk'<\/span>, <span class=\"string\">'Hammarling'<\/span>, <span class=\"string\">'Szyld'<\/span>, <span class=\"string\">'Fischer'<\/span>, <span class=\"keyword\">...<\/span>\r\n    <span class=\"string\">'Stewart'<\/span>, <span class=\"string\">'Bunch'<\/span>, <span class=\"string\">'Gutknecht'<\/span>, <span class=\"string\">'Laub'<\/span>, <span class=\"string\">'Heath'<\/span>, <span class=\"string\">'Ipsen'<\/span>, <span class=\"keyword\">...<\/span>\r\n    <span class=\"string\">'Greenbaum'<\/span>, <span class=\"string\">'Ruhe'<\/span>, <span class=\"string\">'ATrefethen'<\/span>, <span class=\"string\">'Plemmons'<\/span>, <span class=\"string\">'Hansen'<\/span>, <span class=\"string\">'Elden'<\/span>, <span class=\"keyword\">...<\/span>\r\n    <span class=\"string\">'BunseGerstner'<\/span>, <span class=\"string\">'Gragg'<\/span>, <span class=\"string\">'Berry'<\/span>, <span class=\"string\">'Sameh'<\/span>, <span class=\"string\">'Ammar'<\/span>, <span class=\"string\">'Warner'<\/span>, <span class=\"keyword\">...<\/span>\r\n    <span class=\"string\">'Davis'<\/span>, <span class=\"string\">'Meyer'<\/span>, <span class=\"string\">'Nichols'<\/span>, <span class=\"string\">'Paige'<\/span>, <span class=\"string\">'Gill'<\/span>, <span class=\"string\">'Jessup'<\/span>, <span class=\"string\">'Mathias'<\/span>, <span class=\"keyword\">...<\/span>\r\n    <span class=\"string\">'Hochbruck'<\/span>, <span class=\"string\">'Starke'<\/span>, <span class=\"string\">'Demmel'<\/span>};\r\n  <span class=\"keyword\">end<\/span>\r\n<\/pre><h4>Thanks<a name=\"01bb7b30-4688-414f-af9f-3ed6e089f5fd\"><\/a><\/h4><p>Special thanks to Christine Tobler and Cosmin Ionita at MathWorks for help with today's post.<\/p><script language=\"JavaScript\"> <!-- \r\n    function grabCode_d4f36d29b93b46a19b33aa6c7f856af8() {\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='d4f36d29b93b46a19b33aa6c7f856af8 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' d4f36d29b93b46a19b33aa6c7f856af8';\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 2017 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_d4f36d29b93b46a19b33aa6c7f856af8()\"><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; R2017a<br><\/p><\/div><!--\r\nd4f36d29b93b46a19b33aa6c7f856af8 ##### SOURCE BEGIN #####\r\n%% Lake Arrowhead Coauthor Graph Revisited\r\n% The Lake Arrowhead Coauthor Graph came out of the Householder XII\r\n% conference in 1993 at the UCLA conference center in the mountains\r\n% north of San Bernardino.  John Gilbert now remembers it as one of the\r\n% first computational social network analyses he had ever seen.  \r\n% Today I revisit it using the new MATLAB graph object.\r\n\r\n%% Coauthor Graph\r\n% I wrote a\r\n% <https:\/\/blogs.mathworks.com\/cleve\/2013\/06\/10\/lake-arrowhead-coauthor-graph\/ \r\n% blog post> about the Lake Arrowhead Coauthor Graph a couple of years\r\n% ago.\r\n\r\n%%\r\n% At the Householder XII conference in 1993\r\n% Nick Trefethen posted a flip chart with Gene Golub's name in the center.\r\n% He invited everyone present to add their name to the chart and draw lines\r\n% connecting their name with the names of all their coauthors.  The diagram\r\n% grew denser throughout the week.  At the end of the conference it was a\r\n% graph with 104 vertices (or people) and 211 edges.\r\n\r\n%%\r\n% Nick framed the original chart and has it on the wall of his office at \r\n% Oxford.  Another Nick, Nick Hale, took \r\n% <https:\/\/blogs.mathworks.com\/cleve\/2013\/06\/15\/lake-arrowhead-coauthor-graph-photos\r\n% this photo>.\r\n%\r\n% <<mg4872.jpg>>\r\n\r\n%% The Data\r\n% John Gilbert, Rob Schreiber and I entered the names and coauthor\r\n% connections into MATLAB, creating an adjacency matrix |A|.\r\n% For a long time the data was available as a |.mat| file from John's old\r\n% web site at Xerox PARC.  But John left PARC years ago, so I am now\r\n% making the data available in human-readable form at the end of this\r\n% blog post.  There are two files.\r\n\r\n   A = arrowhead_adjacency;\r\n   names = arrowhead_names;\r\n\r\n%% Reverse Cuthill-McGee\r\n% The ordering of the authors in the original data is determined by how we\r\n% happened to read them off the flip chart.  Golub is first, and has the\r\n% most connections to other authors.  A symmetric reverse Cuthill-McGee\r\n% ordering of the rest of the nodes puts coauthors near each other and\r\n% reduces the band width of the adjacency matrix.\r\n\r\n   r = [1 symrcm(A(2:end,2:end))+1];\r\n   A = A(r,r);\r\n   names = names(r);\r\n   spy(A)\r\n\r\n%% Circle Layout\r\n% Let's make a MATLAB graph and plot it with the |circle| layout.\r\n% By default, the |graph\/plot| method omits the node names if there are\r\n% more than 100 of them.  This removes clutter and is usually a good idea.\r\n% The resulting unannotated circle layout is a pretty picture, but not\r\n% very informative.\r\n\r\n%%\r\n% The RCM ordering places most of the graph edges, except those connecting\r\n% to Golub, near the circumference of the circle.\r\n\r\n   G = graph(A,names);\r\n   plot(G,'layout','circle')\r\n   axis square\r\n    \r\n%% Node Names\r\n% Move Golub to the center.\r\n\r\n   p = plot(G,'Layout','circle');\r\n   idGolub = findnode(G,'Golub');\r\n   p.XData(idGolub) = 0;\r\n   p.YData(idGolub) = 0;\r\n   axis square\r\n   \r\n%%\r\n% Placing the rest of the names around the outside of the circle\r\n% requires some custom processing.\r\n\r\n   axis off\r\n   t = text(p.XData,p.YData,names);\r\n   theta = linspace(0,360,numel(t)+1);\r\n   for k = 1:numel(t)\r\n       t(k).Rotation = theta(k); \r\n       t(k).String = [blanks(4) t(k).String]; \r\n       t(k).FontSize = 8;\r\n   end\r\n   \r\n%%\r\n% This plot can now be compared with\r\n% <https:\/\/blogs.mathworks.com\/cleve\/2013\/06\/10\/lake-arrowhead-coauthor-graph\/ \r\n% the plot> we originally produced at Householder XII.\r\n\r\n%% Three-Dimensional Layout\r\n% In this two-dimensional circle plot\r\n% it's nearly impossible to follow the links from one author to his or her\r\n% coauthors.  'Moler' is at about 5 o'clock on the circle.  What is the\r\n% degree of my node?  Who are my coauthors?\r\n\r\n%%\r\n% A three-dimensional layout and judicious use of the mouse in conjunction\r\n% with |cameratoolbar| makes it possible to examine this graph in detail.\r\n\r\n   p = plot(G,'layout','force3','nodelabelmode','auto');\r\n   % Setting the nodelabelmode says include all of the names.\r\n   axis off vis3d\r\n   set(gca,'clipping','off')\r\n   zoom(2)\r\n   gif_frame('arrowhead_name.gif')\r\n   gif_frame(2)\r\n\r\n%% Moler's Coauthors\r\n% Let's highlight me and my coauthors.\r\n\r\n   me = findnode(G,'Moler')\r\n   friends = neighbors(G,me)'\r\n   color = get(gca,'colororder');\r\n   highlight(p,[me friends],'nodecolor',color(2,:),'markersize',6)\r\n   highlight(p,me,friends,'edgecolor',color(2,:),'linewidth',2)\r\n   gif_frame(2)\r\n \r\n%% Center\r\n% Make my node the center of this little universe.\r\n\r\n   set(p,'xdata',p.XData - p.XData(me), ...\r\n         'ydata',p.YData - p.YData(me), ...\r\n         'zdata',p.ZData - p.ZData(me))\r\n   gif_frame(2)\r\n\r\n%% Zoom\r\n% Now zoom and rotate.  \r\n% This is much better done in person with |cameratoolbar|.\r\n% The best we can do in this blog is an animated gif.\r\n\r\n   % Zoom\r\n   for k = 1:4\r\n       zoom(sqrt(2))\r\n       gif_frame\r\n   end\r\n   \r\n   % Rotate\r\n   [a,e] = view;\r\n   for k = 1:4\r\n       view(a,e-12*k)\r\n       gif_frame\r\n   end\r\n   gif_frame(5)\r\n   \r\n%% Animation\r\n% Here is the animated .gif centered on me and my coauthors.\r\n%\r\n% <<arrowhead_moler.gif>>\r\n\r\n%%\r\n% And here we zoom in on Paul VanDooren by replacing\r\n%\r\n%    me = findnode(G,'Moler')\r\n%\r\n% with\r\n%\r\n%    me = findnode(G,'VanDooren')\r\n%\r\n% <<arrowhead_vandooren.gif>>\r\n\r\n%% arrowhead_adjacency.m\r\n\r\n   function A = arrowhead_adjacency\r\n     k = [ 1  1   1   1   1   3   3   1   1   1   1   2   3   3  38   1   2 ...\r\n     32  42   3  32  42  43  44  44   1  46   1   1  37  13  49   1  32   1 ...\r\n     44  53   1  53  44  45  54   1   1  20  41  44   1  39  52  60  15  58 ...\r\n     61   3  63  41  43   1  15  35  51  61  41  43  59  65  53   3  58  63 ...\r\n     42   1  41  44   1  46  47   1  10  15  32  35  62  66   2  19  39  58 ...\r\n     61  66  69  37  53   1   9  72  42   8  21  32  42  77   1   7  15  46 ...\r\n     47  49   6  42  66   1   3  25  41  43  59  65  67  80  33  52  59  27 ...\r\n     28  46  74  31  51  46   1  22  23  24  25  35  41  52  81   3  21  55 ...\r\n     60  44  58  62   4  17  12  19  23  72  77  89   1  23  86   1  23  86 ...\r\n     91   4  72  90  19  90  48   1  18  25  77  82  86  17  52  66  86  89 ...\r\n     16  32  34  58  66  80  81   1  34  74  77  14  82  77  79  49 102  26 ...\r\n     32  39  44  48  51  52  56  63  69  74  78  81  83  90];\r\n\r\n     j = [ 2  3   5  10  11  29  30  32  34  35  36  36  38  40  40  41  42 ...\r\n     42  43  44  44  44  44  45  46  47  47  48  49  49  50  50  51  51  53 ...\r\n     54  54  55  55  56  56  57  58  59  59  59  59  60  60  60  61  62  62 ...\r\n     62  63  64  65  65  66  66  66  66  66  67  67  67  67  68  69  69  69 ...\r\n     70  71  71  71  72  72  72  73  73  73  73  73  73  73  74  74  74  74 ...\r\n     74  74  74  75  75  76  76  76  77  78  78  78  78  78  79  79  79  79 ...\r\n     79  79  80  80  80  81  81  81  81  81  81  81  81  81  82  82  82  83 ...\r\n     83  83  83  84  84  85  86  86  86  86  86  86  86  86  86  87  87  87 ...\r\n     87  88  88  88  89  89  90  90  90  90  90  90  91  91  91  92  92  92 ...\r\n     92  93  93  93  94  94  95  96  96  96  96  96  96  97  97  97  97  97 ...\r\n     98  98  98  98  98  98  98  99  99  99  99 100 100 101 102 103 103 104 ...\r\n     104 104 104 104 104 104 104 104 104 104 104 104 104 104];\r\n\r\n     U = sparse(k,j,1,104,104);\r\n     A = logical(U + U');\r\n  end\r\n\r\n%% arrowhead_names.m\r\n\r\n  function names = arrowhead_names\r\n    names = {'Golub', 'Wilkinson', 'TChan', 'He', 'Varah', 'Kenney', ...\r\n    'Ashby', 'LeBorne', 'Modersitzki', 'Overton', 'Ernst', 'Borges', ...\r\n    'Kincaid', 'Crevelli', 'Boley', 'Anjos', 'Byers', 'Benzi', 'Kaufman', ...\r\n    'Gu', 'Fierro', 'Nagy', 'Harrod', 'Pan', 'Funderlic', 'Edelman', ...\r\n    'Cullum', 'Strakos', 'Saied', 'Ong', 'Wold', 'VanLoan', ...\r\n    'Chandrasekaran', 'Saunders', 'Bojanczyk', 'Dubrulle', 'Marek', ...\r\n    'Kuo', 'Bai', 'Tong', 'George', 'Moler', 'Gilbert', 'Schreiber', ...\r\n    'Pothen', 'NTrefethen', 'Nachtigal', 'Kahan', 'Varga', 'Young', ...\r\n    'Kagstrom', 'Barlow', 'Widlund', 'Bjorstad', 'OLeary', 'NHigham', ...\r\n    'Boman', 'Bjorck', 'Eisenstat', 'Zha', 'VanHuffel', 'Park', 'Arioli', ...\r\n    'MuntheKaas', 'Ng', 'VanDooren', 'Liu', 'Smith', 'Duff', 'Henrici', ...\r\n    'Tang', 'Reichel', 'Luk', 'Hammarling', 'Szyld', 'Fischer', ...\r\n    'Stewart', 'Bunch', 'Gutknecht', 'Laub', 'Heath', 'Ipsen', ...\r\n    'Greenbaum', 'Ruhe', 'ATrefethen', 'Plemmons', 'Hansen', 'Elden', ...\r\n    'BunseGerstner', 'Gragg', 'Berry', 'Sameh', 'Ammar', 'Warner', ...\r\n    'Davis', 'Meyer', 'Nichols', 'Paige', 'Gill', 'Jessup', 'Mathias', ...\r\n    'Hochbruck', 'Starke', 'Demmel'}; \r\n  end\r\n  \r\n%% Thanks\r\n% Special thanks to Christine Tobler and Cosmin Ionita at MathWorks for\r\n% help with today's post.\r\n\r\n\r\n##### SOURCE END ##### d4f36d29b93b46a19b33aa6c7f856af8\r\n-->","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/arrowhead2_04.png\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div><!--introduction--><p>The Lake Arrowhead Coauthor Graph came out of the Householder XII conference in 1993 at the UCLA conference center in the mountains north of San Bernardino.  John Gilbert now remembers it as one of the first computational social network analyses he had ever seen. Today I revisit it using the new MATLAB graph object.... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/cleve\/2017\/03\/06\/lake-arrowhead-coauthor-graph-revisited\/\">read more >><\/a><\/p>","protected":false},"author":78,"featured_media":2369,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[23],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/2362"}],"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=2362"}],"version-history":[{"count":5,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/2362\/revisions"}],"predecessor-version":[{"id":2379,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/2362\/revisions\/2379"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/media\/2369"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/media?parent=2362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/categories?post=2362"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/tags?post=2362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}