{"id":265629,"date":"2015-09-15T10:09:03","date_gmt":"2015-09-15T06:09:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=265629"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=265629","title":{"rendered":"\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0435\u0442\u0435\u0439 \u043d\u0430 R, \u0447\u0430\u0441\u0442\u044c 4"},"content":{"rendered":"<p>       \u0412 <a href=\"http:\/\/habrahabr.ru\/company\/infopulse\/blog\/262079\/\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a>:  <\/p>\n<ul>\n<li>\u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0435\u0442\u0435\u0439: \u0437\u0430\u0447\u0435\u043c? \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c?<\/li>\n<li>\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/li>\n<li>best practices \u2014 \u044d\u0441\u0442\u0435\u0442\u0438\u043a\u0430 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/li>\n<li>\u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/li>\n<li>\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445<\/li>\n<li>\u043d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u0441 igraph<\/li>\n<\/ul>\n<p>  \u0412\u043e <a href=\"http:\/\/habrahabr.ru\/company\/infopulse\/blog\/263947\/\">\u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a>: \u0446\u0432\u0435\u0442\u0430 \u0438 \u0448\u0440\u0438\u0444\u0442\u044b \u0432 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u0445 R.<\/p>\n<p>  \u0412 <a href=\"http:\/\/habrahabr.ru\/company\/infopulse\/blog\/263953\/\">\u0442\u0440\u0435\u0442\u044c\u0435\u0439<\/a> \u0447\u0430\u0441\u0442\u0438: \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0433\u0440\u0430\u0444\u043e\u0432, \u0432\u0435\u0440\u0448\u0438\u043d \u0438 \u0440\u0435\u0431\u0435\u0440.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438: \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0441\u0435\u0442\u0438.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0441\u0435\u0442\u0438<\/h4>\n<p>  \u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0441\u0435\u0442\u0438 \u2014 \u044d\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0438\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0433\u0440\u0430\u0444\u0430.<br \/>  \u0414\u043b\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0439 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u0433\u0440\u0430\u0444, \u0438\u0437 80 \u0432\u0435\u0440\u0448\u0438\u043d. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e barabasi.game, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0433\u0440\u0430\u0444, \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0439\u0441\u044f \u0441 \u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0438 \u043d\u0430\u0440\u0430\u0449\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0438 \u0440\u0435\u0431\u0440\u0430 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f (\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0435\u0449\u0435 \u043d\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0443\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u0441 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c\u0438 \u0432\u0435\u0440\u0448\u0438\u043d\u0430\u043c\u0438 \u0432 \u0441\u0435\u0442\u0438).  <\/p>\n<pre><code class=\"python\">net.bg &lt;- barabasi.game(80)  V(net.bg)$frame.color &lt;- &quot;white&quot; V(net.bg)$color &lt;- &quot;orange&quot; V(net.bg)$label &lt;- &quot;&quot;  V(net.bg)$size &lt;- 10 E(net.bg)$arrow.mode &lt;- 0 plot(net.bg) <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a58\/d5d\/f5c\/a58d5df5c1734ee99c550d6db176d947.png\" width=\"30%\"\/><\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f:  <\/p>\n<pre><code class=\"python\">plot(net.bg, layout=layout.random) <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/d6c\/ed5\/be9\/d6ced5be96cf45b096089fd6a2a9da3d.png\" width=\"30%\"\/><\/p>\n<p>  \u0418\u043b\u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0432\u0435\u0440\u0448\u0438\u043d \u0437\u0430\u0440\u0430\u043d\u0435\u0435:  <\/p>\n<pre><code class=\"python\">l &lt;- layout.circle(net.bg) plot(net.bg, layout=l) <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/474\/d50\/bd6\/474d50bd65b9400eb80cc48f0d3eee66.png\" width=\"30%\"\/><\/p>\n<p>  <code>l<\/code> \u2014 \u043c\u0430\u0442\u0440\u0438\u0446\u0430 x- \u0438 y-\u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 (N x 2) \u0434\u043b\u044f N \u0432\u0435\u0440\u0448\u0438\u043d \u0433\u0440\u0430\u0444\u0430. \u0418\u0445 \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e:  <\/p>\n<pre><code class=\"python\">l &lt;- matrix(c(1:vcount(net.bg), c(1, vcount(net.bg):2)), vcount(net.bg), 2) plot(net.bg, layout=l) <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/024\/3d0\/0c9\/0243d00c955b40d8aeb0339ca5472563.png\" width=\"30%\"\/><\/p>\n<p>  \u042d\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u2014 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u043d\u043e \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043f\u043e\u043b\u0435\u0437\u043d\u043e. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0432 igraph \u0435\u0441\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0439, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0442\u0430\u043a\u0438\u0435:  <\/p>\n<pre><code class=\"python\"># \u0421\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u044b l &lt;- layout.random(net.bg) plot(net.bg, layout=l) <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/7da\/df1\/dc7\/7dadf1dc738e43499fa5c88ad226ab0f.png\" width=\"30%\"\/><\/p>\n<pre><code class=\"python\"># \u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u0440\u0443\u0433\u0443 l &lt;- layout.circle(net.bg) plot(net.bg, layout=l) <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/7c2\/fc1\/1e6\/7c2fc11e64e94be4a1743c0d76ba637e.png\" width=\"30%\"\/><\/p>\n<pre><code class=\"python\"># \u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432 \u0432\u0438\u0434\u0435 3D-\u0441\u0444\u0435\u0440\u044b l &lt;- layout.sphere(net.bg) plot(net.bg, layout=l) <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/6e0\/aab\/213\/6e0aab21304c49a58abe3d9422b12edb.png\" width=\"30%\"\/><\/p>\n<p>  \u0424\u0440\u044e\u0445\u0442\u0435\u0440\u043c\u0430\u043d-\u0420\u0435\u0439\u043d\u0433\u043e\u043b\u044c\u0434 \u2014 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0441\u0438\u043b\u043e\u0432\u044b\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0421\u0438\u043b\u043e\u0432\u044b\u0435 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0430 \u0441 \u0440\u0435\u0431\u0440\u0430\u043c\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0434\u043b\u0438\u043d\u044b \u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0439. \u041e\u043d\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0433\u0440\u0430\u0444 \u0432 \u0432\u0438\u0434\u0435 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0412\u0435\u0440\u0448\u0438\u043d\u044b \u2014 \u044d\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u0440\u044f\u0436\u0435\u043d\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438\u0446\u044b, \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430 \u043f\u0440\u0438 \u0447\u0440\u0435\u0437\u043c\u0435\u0440\u043d\u043e\u043c \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0438. \u0420\u0435\u0431\u0440\u0430 \u0432\u0435\u0434\u0443\u0442 \u0441\u0435\u0431\u044f, \u043a\u0430\u043a \u043f\u0440\u0443\u0436\u0438\u043d\u044b, \u043f\u0440\u0438\u0442\u044f\u0433\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u043f\u043e\u0431\u043b\u0438\u0436\u0435 \u0434\u0440\u0443\u0433 \u043a \u0434\u0440\u0443\u0433\u0443. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430, \u0430 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u0432 \u0442\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435, \u0447\u0442\u043e \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0441\u0432\u044f\u0437\u0435\u0439 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0431\u043b\u0438\u0436\u0435 \u0434\u0440\u0443\u0433 \u043a \u0434\u0440\u0443\u0433\u0443. \u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u044d\u0442\u0438\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b, \u0430 \u043f\u043e\u0442\u043e\u043c\u0443 \u0440\u0435\u0434\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043d\u0430 \u0433\u0440\u0430\u0444\u0430\u0445 \u0441 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0432\u0435\u0440\u0448\u0438\u043d \u0431\u043e\u043b\u044c\u0448\u0435 1000.<\/p>\n<p>  \u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f: <code>area<\/code> (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u2014 \u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u0435\u0440\u0448\u0438\u043d) \u0438 <code>repulserad<\/code> (\u0440\u0430\u0434\u0438\u0443\u0441 \u043f\u043e\u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043d\u0438\u044f \u2014 area, \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u043d\u0430\u044f \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0435\u0440\u0448\u0438\u043d). \u041e\u0431\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u2014 \u0438\u0437\u043c\u0435\u043d\u044f\u0439\u0442\u0435 \u0438\u0445, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0435\u0441\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u044b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u00ab\u0432\u0435\u0441\u0430\u00bb, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0441\u0438\u043b\u044b \u043f\u0440\u0438\u0442\u044f\u0436\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0432\u0435\u0440\u0448\u0438\u043d\u0430\u043c\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0431\u043e\u043b\u0435\u0435 \u0442\u044f\u0436\u0435\u043b\u044b\u043c\u0438 \u0440\u0435\u0431\u0440\u0430\u043c\u0438.<\/p>\n<p>  \u0412\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u0435, \u0447\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043d\u0435 \u0441\u0442\u0440\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e \u2014 \u0440\u0430\u0437\u043d\u044b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u043a \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0449\u0438\u043c\u0441\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u043c. \u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f <code>l<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438\u043b\u0438 \u0440\u0430\u0437\u043d\u044b\u0435 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u2014 \u0438 \u043d\u0443\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u043d\u0430 \u043e\u0434\u043d\u0438\u0445 \u0438 \u0442\u0435\u0445 \u0436\u0435 \u043c\u0435\u0441\u0442\u0430\u0445 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u0445.<\/p>\n<p>  \u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 <code>fruchterman.reingold.grid<\/code> \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e <code>fruchterman.reingold<\/code>, \u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435.  <\/p>\n<pre><code class=\"python\">l &lt;- layout.fruchterman.reingold(net.bg, repulserad=vcount(net.bg)^3,                                        area=vcount(net.bg)^2.4) par(mfrow=c(1,2),  mar=c(0,0,0,0)) # \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u0432\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 - 1 \u0441\u0442\u0440\u043e\u043a\u0430, 2 \u0441\u0442\u043e\u043b\u0431\u0446\u0430 plot(net.bg, layout=layout.fruchterman.reingold) plot(net.bg, layout=l) <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a0d\/63f\/d71\/a0d63fd716ff41b6884892b1e70cb87f.png\" width=\"75%\"\/><\/p>\n<pre><code class=\"python\">dev.off() # \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e. <\/code><\/pre>\n<p>  \u0414\u0440\u0443\u0433\u043e\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0438\u043b\u043e\u0432\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u043d\u044b\u0445 \u0433\u0440\u0430\u0444\u043e\u0432 \u2014 \u041a\u0430\u043c\u0430\u0434\u0430-\u041a\u0430\u0432\u0430\u0438. \u041a\u0430\u043a \u0438 \u0424\u0440\u044e\u0445\u0442\u0435\u0440\u043c\u0430\u043d-\u0420\u0435\u0439\u043d\u0433\u043e\u043b\u044c\u0434, \u0435\u0433\u043e \u0446\u0435\u043b\u044c \u2014 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u043d\u0435\u0440\u0433\u0438\u044e \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043f\u0440\u0443\u0436\u0438\u043d. Igraph \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u0443\u0436\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>layout.spring()<\/code>.  <\/p>\n<pre><code class=\"python\">l &lt;- layout.kamada.kawai(net.bg) plot(net.bg, layout=l)  l &lt;- layout.spring(net.bg, mass=.5) plot(net.bg, layout=l) <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/b22\/81a\/f1f\/b2281af1faf14f3fb86505c5cabbb4ce.png\" width=\"75%\"\/><\/p>\n<p>  \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c LGL (Large Graph Layout \u2014 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0433\u0440\u0430\u0444\u043e\u0432) \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0441\u0432\u044f\u0437\u043d\u044b\u0445 \u0433\u0440\u0430\u0444\u043e\u0432. \u041e\u043d \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0434\u0430\u0442\u044c \u043a\u043e\u0440\u0435\u043d\u044c \u2014 \u0432\u0435\u0440\u0448\u0438\u043d\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u0432 \u0446\u0435\u043d\u0442\u0440\u0435 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f.  <\/p>\n<pre><code class=\"python\">plot(net.bg, layout=layout.lgl) <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/7e7\/a8c\/8d6\/7e7a8c8d69724113bd624ca1ee70e346.png\" width=\"30%\"\/><\/p>\n<p>  \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0434\u043e \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 [-1,1] \u043a\u0430\u043a \u043f\u043e \u0445, \u0442\u0430\u043a \u0438 \u043f\u043e \u0443. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <code>rescale=FALSE<\/code> \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0443\u043c\u043d\u043e\u0436\u0430\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043d\u0430 \u0447\u0438\u0441\u043b\u043e. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>layout.norm<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a \u043f\u043e \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u043c \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u043c.  <\/p>\n<pre><code class=\"python\">l &lt;- layout.fruchterman.reingold(net.bg) l &lt;- layout.norm(l, ymin=-1, ymax=1, xmin=-1, xmax=1)  par(mfrow=c(2,2), mar=c(0,0,0,0)) plot(net.bg, rescale=F, layout=l*0.4) plot(net.bg, rescale=F, layout=l*0.6) plot(net.bg, rescale=F, layout=l*0.8) plot(net.bg, rescale=F, layout=l*1.0) <\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/37c\/6d7\/718\/37c6d77187f1472bbbfa40f8d1bd074e.png\" width=\"75%\"\/><\/p>\n<pre><code class=\"python\">dev.off() <\/code><\/pre>\n<p>  \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e igraph \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 <code>layout.auto<\/code>. \u041e\u043d \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0433\u0440\u0430\u0444\u0430 (\u0440\u0430\u0437\u043c\u0435\u0440\u0443 \u0438 \u0441\u0432\u044f\u0437\u043d\u043e\u0441\u0442\u0438).<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0432 igraph:  <\/p>\n<pre><code class=\"python\">layouts &lt;- grep(&quot;^layout\\\\.&quot;, ls(&quot;package:igraph&quot;), value=TRUE)  # \u0423\u0431\u0440\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f, \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0433\u0440\u0430\u0444\u0430. layouts &lt;- layouts[!grepl(&quot;bipartite|merge|norm|sugiyama&quot;, layouts)]  par(mfrow=c(3,3))  for (layout in layouts) {   print(layout)   l &lt;- do.call(layout, list(net))    plot(net, edge.arrow.mode=0, layout=l, main=layout) }  dev.off() <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/79a\/2fe\/145\/79a2fe1453cf4703ad7e950cf9cd8790.png\" width=\"75%\"\/>       <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/266199\/\"> http:\/\/habrahabr.ru\/post\/266199\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0412 <a href=\"http:\/\/habrahabr.ru\/company\/infopulse\/blog\/262079\/\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a>:  <\/p>\n<ul>\n<li>\u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0435\u0442\u0435\u0439: \u0437\u0430\u0447\u0435\u043c? \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c?<\/li>\n<li>\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/li>\n<li>best practices \u2014 \u044d\u0441\u0442\u0435\u0442\u0438\u043a\u0430 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/li>\n<li>\u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/li>\n<li>\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445<\/li>\n<li>\u043d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u0441 igraph<\/li>\n<\/ul>\n<p>  \u0412\u043e <a href=\"http:\/\/habrahabr.ru\/company\/infopulse\/blog\/263947\/\">\u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a>: \u0446\u0432\u0435\u0442\u0430 \u0438 \u0448\u0440\u0438\u0444\u0442\u044b \u0432 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u0445 R.<\/p>\n<p>  \u0412 <a href=\"http:\/\/habrahabr.ru\/company\/infopulse\/blog\/263953\/\">\u0442\u0440\u0435\u0442\u044c\u0435\u0439<\/a> \u0447\u0430\u0441\u0442\u0438: \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0433\u0440\u0430\u0444\u043e\u0432, \u0432\u0435\u0440\u0448\u0438\u043d \u0438 \u0440\u0435\u0431\u0435\u0440.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438: \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0441\u0435\u0442\u0438.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-265629","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/265629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=265629"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/265629\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=265629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=265629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=265629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}