{"id":265056,"date":"2015-09-07T08:52:02","date_gmt":"2015-09-07T04:52:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=265056"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=265056","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 3"},"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 \u044d\u0442\u043e\u0439 \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.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432 \u0441\u0435\u0442\u0435\u0439<\/h4>\n<p>  \u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0441 igraph: \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0441\u0435\u0442\u0435\u0439 \u0438\u043c\u0435\u044e\u0442 \u043e\u0431\u0448\u0438\u0440\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0435\u0441\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432\u0435\u0440\u0448\u0438\u043d (\u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0441 <code>vertex.<\/code>) \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0440\u0435\u0431\u0435\u0440 (\u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0441 <code>edge.<\/code>). \u0421\u043f\u0438\u0441\u043e\u043a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043d\u0438\u0436\u0435, \u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>?igraph.plotting<\/code>.<\/p>\n<p>  \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0439 \u0432 igraph (\u0441\u0440\u0435\u0434\u0438 \u043f\u0440\u043e\u0447\u0438\u0445):<\/p>\n<h4>\u0412\u0435\u0440\u0448\u0438\u043d\u044b<\/h4>\n<table>\n<tr>\n<td><b>vertex.color<\/b><\/td>\n<td>\u0446\u0432\u0435\u0442 \u0432\u0435\u0440\u0448\u0438\u043d\u044b<\/td>\n<\/tr>\n<tr>\n<td><b>vertex.frame.color<\/b><\/td>\n<td>\u0446\u0432\u0435\u0442 \u043a\u043e\u043d\u0442\u0443\u0440\u0430 \u0432\u0435\u0440\u0448\u0438\u043d\u044b<\/td>\n<\/tr>\n<tr>\n<td><b>vertex.shape<\/b><\/td>\n<td>\u0444\u043e\u0440\u043c\u0430 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0448\u0438\u043d\u044b, \u043e\u0434\u043d\u043e \u0438\u0437 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u00abnone\u00bb, \u00abcircle\u00bb, \u00absquare\u00bb, \u00abcsquare\u00bb, \u00abrectangle\u00bb, \u00abcrectangle\u00bb, \u00abvrectangle\u00bb, \u00abpie\u00bb, \u00abraster\u00bb, \u00absphere\u00bb<\/td>\n<\/tr>\n<tr>\n<td><b>vertex.size<\/b><\/td>\n<td>\u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u0435\u0440\u0448\u0438\u043d\u044b (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 15)<\/td>\n<\/tr>\n<tr>\n<td><b>vertex.size2<\/b><\/td>\n<td>\u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432\u0435\u0440\u0448\u0438\u043d\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430)<\/td>\n<\/tr>\n<tr>\n<td><b>vertex.label<\/b><\/td>\n<td>\u0432\u0435\u043a\u0442\u043e\u0440 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0434\u043b\u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0448\u0438\u043d<\/td>\n<\/tr>\n<tr>\n<td><b>vertex.label.family<\/b><\/td>\n<td>\u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u0448\u0440\u0438\u0444\u0442\u043e\u0432 \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u043a \u0432\u0435\u0440\u0448\u0438\u043d (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00abTimes\u00bb, \u00abHelvetica\u00bb)<\/td>\n<\/tr>\n<tr>\n<td><b>vertex.label.font<\/b><\/td>\n<td>\u0448\u0440\u0438\u0444\u0442: 1 \u2014 \u043e\u0431\u044b\u0447\u043d\u044b\u0439, 2 \u2014 \u0436\u0438\u0440\u043d\u044b\u0439, 3 \u2014 \u043a\u0443\u0440\u0441\u0438\u0432, 4 \u2014 \u0436\u0438\u0440\u043d\u044b\u0439 \u043a\u0443\u0440\u0441\u0438\u0432, 5 \u2014 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0439<\/td>\n<\/tr>\n<tr>\n<td><b>vertex.label.cex<\/b><\/td>\n<td>\u0440\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 (\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044c, \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430)<\/td>\n<\/tr>\n<tr>\n<td><b>vertex.label.dist<\/b><\/td>\n<td>\u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043c\u0435\u0442\u043a\u043e\u0439 \u0438 \u0432\u0435\u0440\u0448\u0438\u043d\u043e\u0439<\/td>\n<\/tr>\n<tr>\n<td><b>vertex.label.degree<\/b><\/td>\n<td>\u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043a\u0438 \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a \u0432\u0435\u0440\u0448\u0438\u043d\u0435: 0 \u2014 \u0441\u043f\u0440\u0430\u0432\u0430, \u00abpi\u00bb \u2014 \u0441\u043b\u0435\u0432\u0430, \u00abpi\/2\u00bb \u2014 \u0441\u043d\u0438\u0437\u0443, &quot;-pi\/2&quot; \u2014 \u0441\u0432\u0435\u0440\u0445\u0443<\/td>\n<\/tr>\n<\/table>\n<p>  <\/p>\n<h4>\u0420\u0435\u0431\u0440\u0430<\/h4>\n<table>\n<tr>\n<td><b>edge.color<\/b><\/td>\n<td>\u0446\u0432\u0435\u0442 \u0440\u0435\u0431\u0440\u0430<\/td>\n<\/tr>\n<tr>\n<td><b>edge.width<\/b><\/td>\n<td>\u0448\u0438\u0440\u0438\u043d\u0430 \u0440\u0435\u0431\u0440\u0430, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 1<\/td>\n<\/tr>\n<tr>\n<td><b>edge.arrow.size<\/b><\/td>\n<td>\u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u0440\u0435\u043b\u043a\u0438, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 1<\/td>\n<\/tr>\n<tr>\n<td><b>edge.arrow.width<\/b><\/td>\n<td>\u0448\u0438\u0440\u0438\u043d\u0430 \u0441\u0442\u0440\u0435\u043b\u043a\u0438, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 1<\/td>\n<\/tr>\n<tr>\n<td><b>edge.lty<\/b><\/td>\n<td>\u0442\u0438\u043f \u043b\u0438\u043d\u0438\u0438, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c 0 \u0438\u043b\u0438 \u00abblank\u00bb (\u043d\u0435\u0442), 1 \u0438\u043b\u0438 \u00absolid\u00bb (\u0441\u043f\u043b\u043e\u0448\u043d\u0430\u044f), 2 \u0438\u043b\u0438 \u00abdashed\u00bb (\u0440\u0430\u0437\u0440\u044b\u0432\u043d\u0430\u044f), 3 \u0438\u043b\u0438 \u00abdotted\u00bb (\u043f\u0443\u043d\u043a\u0442\u0438\u0440), 4 \u0438\u043b\u0438 \u00abdotdash\u00bb (\u0442\u043e\u0447\u043a\u0430-\u0442\u0438\u0440\u0435), 5 \u0438\u043b\u0438 \u00ablongdash\u00bb (\u0434\u043b\u0438\u043d\u043d\u043e\u0435 \u0442\u0438\u0440\u0435), 6 \u0438\u043b\u0438 \u00abtwodash\u00bb (\u0434\u0432\u043e\u0439\u043d\u043e\u0435 \u0442\u0438\u0440\u0435)<\/td>\n<\/tr>\n<tr>\n<td><b>edge.label<\/b><\/td>\n<td>\u0432\u0435\u043a\u0442\u043e\u0440 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0434\u043b\u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0431\u0435\u0440<\/td>\n<\/tr>\n<tr>\n<td><b>edge.label.family<\/b><\/td>\n<td>\u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u0448\u0440\u0438\u0444\u0442\u043e\u0432 \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u043a \u0440\u0435\u0431\u0435\u0440 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00abTimes\u00bb, \u00abHelvetica\u00bb)<\/td>\n<\/tr>\n<tr>\n<td><b>edge.label.font<\/b><\/td>\n<td>\u0448\u0440\u0438\u0444\u0442: 1 \u2014 \u043e\u0431\u044b\u0447\u043d\u044b\u0439, 2 \u2014 \u0436\u0438\u0440\u043d\u044b\u0439, 3 \u2014 \u043a\u0443\u0440\u0441\u0438\u0432, 4 \u2014 \u0436\u0438\u0440\u043d\u044b\u0439 \u043a\u0443\u0440\u0441\u0438\u0432, 5 \u2014 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0439<\/td>\n<\/tr>\n<tr>\n<td><b>edge.label.cex<\/b><\/td>\n<td>\u0440\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u043c\u0435\u0442\u043e\u043a \u0440\u0435\u0431\u0435\u0440<\/td>\n<\/tr>\n<tr>\n<td><b>edge.curved<\/b><\/td>\n<td>\u0438\u0437\u0433\u0438\u0431 \u0440\u0435\u0431\u0440\u0430, \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 0 \u0434\u043e 1 (FALSE \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0432 0, TRUE \u2014 \u0432 0,5)<\/td>\n<\/tr>\n<tr>\n<td><b>arrow.mode<\/b><\/td>\n<td>\u0432\u0435\u043a\u0442\u043e\u0440, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0439, \u0434\u043e\u043b\u0436\u043d\u044b \u043b\u0438 \u0440\u0435\u0431\u0440\u0430 \u0438\u043c\u0435\u0442\u044c \u0441\u0442\u0440\u0435\u043b\u043a\u0438, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f: 0 \u2014 \u043d\u0435\u0442 \u0441\u0442\u0440\u0435\u043b\u043a\u0438, 1 \u2014 \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f, 2 \u2014 \u043f\u0440\u044f\u043c\u0430\u044f, 3 \u2014 \u0432 \u043e\u0431\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b<\/td>\n<\/tr>\n<\/table>\n<p>  <\/p>\n<h4>\u0414\u0440\u0443\u0433\u043e\u0435<\/h4>\n<table>\n<tr>\n<td><b>margin<\/b><\/td>\n<td>\u043f\u0443\u0441\u0442\u044b\u0435 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0432\u043e\u043a\u0440\u0443\u0433 \u0433\u0440\u0430\u0444\u0438\u043a\u0430, \u0432\u0435\u043a\u0442\u043e\u0440 \u0434\u043b\u0438\u043d\u044b 4<\/td>\n<\/tr>\n<tr>\n<td><b>frame<\/b><\/td>\n<td>\u0435\u0441\u043b\u0438 TRUE, \u0433\u0440\u0430\u0444\u0438\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u0437\u044f\u0442 \u0432 \u0440\u0430\u043c\u043a\u0443<\/td>\n<\/tr>\n<tr>\n<td><b>main<\/b><\/td>\n<td>\u0435\u0441\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a \u0433\u0440\u0430\u0444\u0438\u043a\u0443 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a<\/td>\n<\/tr>\n<tr>\n<td><b>sub<\/b><\/td>\n<td>\u0435\u0441\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a \u0433\u0440\u0430\u0444\u0438\u043a\u0443 \u043f\u043e\u0434\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a<\/td>\n<\/tr>\n<\/table>\n<p>  \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u0432\u0435\u0440\u0448\u0438\u043d \u0438 \u0440\u0435\u0431\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u0432\u0443\u043c\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438. \u041f\u0435\u0440\u0432\u044b\u0439 \u2014 \u0437\u0430\u0434\u0430\u0442\u044c \u0438\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>plot()<\/code>, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435.  <\/p>\n<pre><code class=\"javascript\"># \u041f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441 \u0438\u0437\u043e\u0433\u043d\u0443\u0442\u044b\u043c\u0438 \u0440\u0435\u0431\u0440\u0430\u043c\u0438 (edge.curved=.1) \u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u0440\u0435\u043b\u043e\u043a: plot(net, edge.arrow.size=.4, edge.curved=.1) <\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8fd\/3c9\/021\/8fd3c9021d6845dbbae7c8c1379cf706.png\" width=\"60%\"\/>  <\/p>\n<pre><code class=\"javascript\"># \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043e\u0440\u0430\u043d\u0436\u0435\u0432\u044b\u0439 \u0446\u0432\u0435\u0442 \u0434\u043b\u044f \u0432\u0435\u0440\u0448\u0438\u043d \u0438 \u0440\u0435\u0431\u0435\u0440  # \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043c\u0435\u0442\u043a\u0438 \u0432\u0435\u0440\u0448\u0438\u043d \u043d\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u0435\u0441\u044f \u0432 &quot;media&quot; plot(net, edge.arrow.size=.2, edge.color=&quot;orange&quot;,      vertex.color=&quot;orange&quot;, vertex.frame.color=&quot;#ffffff&quot;,      vertex.label=V(net)$media, vertex.label.color=&quot;black&quot;)  <\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/6f0\/324\/e1f\/6f0324e1f255450eafcf637768c36c37.png\" width=\"60%\"\/><br \/>  \u0414\u0440\u0443\u0433\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0437\u0430\u0434\u0430\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u2014 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u0445 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 igraph. \u0421\u043a\u0430\u0436\u0435\u043c, \u043c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u0446\u0432\u0435\u0442 \u0432\u0435\u0440\u0448\u0438\u043d \u0441\u0435\u0442\u0438 \u0437\u0430\u0432\u0438\u0441\u0435\u043b \u043e\u0442 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u2014 \u043e\u0442 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 (\u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0441\u044b\u043b\u043e\u043a \u2014 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u0430). \u0422\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0448\u0438\u0440\u0438\u043d\u0443 \u0440\u0435\u0431\u0435\u0440 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0438\u0445 \u0432\u0435\u0441\u0430.  <\/p>\n<pre><code class=\"javascript\"># \u0417\u0430\u0434\u0430\u0442\u044c \u0446\u0432\u0435\u0442\u0430 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: colrs &lt;- c(&quot;gray50&quot;, &quot;tomato&quot;, &quot;gold&quot;) V(net)$color &lt;- colrs[V(net)$media.type]  # \u0420\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0432\u0435\u0440\u0448\u0438\u043d (\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0432\u044f\u0437\u0435\u0439) \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432\u0435\u0440\u0448\u0438\u043d\u044b: deg &lt;- degree(net, mode=&quot;all&quot;) V(net)$size &lt;- deg*3 # \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043c \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0438: V(net)$size &lt;- V(net)$audience.size*0.6  # \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u0435\u0442\u043a\u0438 - \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0432\u0435\u0440\u0448\u0438\u043d. # \u041c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u0445 \u0432 NA, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0438\u0441\u0447\u0435\u0437\u043b\u0438: V(net)$label &lt;- NA  # \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0448\u0438\u0440\u0438\u043d\u0443 \u0440\u0435\u0431\u0440\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u0435\u0441\u0430: E(net)$width &lt;- E(net)$weight\/6  # \u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u0440\u0435\u043b\u043a\u0438 \u0438 \u0446\u0432\u0435\u0442 \u0440\u0435\u0431\u0440\u0430: E(net)$arrow.size &lt;- .2 E(net)$edge.color &lt;- &quot;gray80&quot; E(net)$width &lt;- 1+E(net)$weight\/12 plot(net)  <\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/ba3\/715\/3f7\/ba37153f7dcd4bb3b4be1d71f95f9446.png\" width=\"40%\"\/><br \/>  \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0433\u0440\u0430\u0444\u0438\u043a\u0435:  <\/p>\n<pre><code class=\"javascript\">plot(net, edge.color=&quot;orange&quot;, vertex.color=&quot;gray50&quot;)  <\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/0cf\/658\/ee9\/0cf658ee968b4d3c89ec98137a027c6c.png\" width=\"40%\"\/><br \/>  \u041f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043b\u0435\u0433\u0435\u043d\u0434\u0443, \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u044e\u0449\u0443\u044e \u0441\u043c\u044b\u0441\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0446\u0432\u0435\u0442\u043e\u0432:  <\/p>\n<pre><code class=\"javascript\">plot(net)  legend(x=-1.5, y=-1.1, c(&quot;Newspaper&quot;,&quot;Television&quot;, &quot;Online News&quot;), pch=21,        col=&quot;#777777&quot;, pt.bg=colrs, pt.cex=2, cex=.8, bty=&quot;n&quot;, ncol=1) <\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/dbd\/dbe\/ca2\/dbddbeca274c4127a206154a9b0d0661.png\" width=\"40%\"\/><br \/>  \u0418\u043d\u043e\u0433\u0434\u0430, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0435\u0442\u044f\u0445, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0442\u043a\u0438 \u0432\u0435\u0440\u0448\u0438\u043d:  <\/p>\n<pre><code class=\"javascript\">plot(net, vertex.shape=&quot;none&quot;, vertex.label=V(net)$media,       vertex.label.font=2, vertex.label.color=&quot;gray40&quot;,      vertex.label.cex=.7, edge.color=&quot;gray85&quot;) <\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/501\/882\/8ab\/5018828ab962494c8a168d86992cb444.png\" width=\"40%\"\/><br \/>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u0438\u043c \u0440\u0435\u0431\u0440\u0430 \u0433\u0440\u0430\u0444\u0430 \u0432 \u0446\u0432\u0435\u0442\u0430 \u0432\u0435\u0440\u0448\u0438\u043d, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043d\u0438 \u0438\u0441\u0445\u043e\u0434\u044f\u0442. \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u0432\u0435\u0440\u0448\u0438\u043d\u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0440\u0435\u0431\u0440\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>get.edges<\/code> \u0438\u0437 igraph.  <\/p>\n<pre><code class=\"javascript\">edge.start &lt;- get.edges(net, 1:ecount(net))[,1] edge.col &lt;- V(net)$color[edge.start]  plot(net, edge.color=edge.col, edge.curved=.1)   <\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/41b\/931\/550\/41b9315508fd4e7e986a1ddec72f5443.png\" width=\"40%\"\/>   \t<\/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\/263953\/\"> http:\/\/habrahabr.ru\/post\/263953\/<\/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 \u044d\u0442\u043e\u0439 \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","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-265056","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/265056","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=265056"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/265056\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=265056"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=265056"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=265056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}