简体   繁体   English

如何在Matlab中绘制以集线器为中心的网络图?

[英]How to draw a hub-centered network diagram in matlab?

I am wondering if matlab has some functions of toolbox to draw networks in a hub-centered way like this: 我想知道matlab是否具有一些工具箱功能,可以像这样以集线器为中心绘制网络:

以集线器为中心的网络图

I have a connectivity matrix of nodes. 我有节点的连接矩阵。 The directions of edges and color are not so important. 边缘和颜色的方向并不是那么重要。 Only the hub-centered style is desired. 只需要以中心为中心的样式。 I have checked the biography toolbox but it seems to be drawing network in a random way. 我已经检查了传记工具箱,但它似乎以随机方式绘制网络。 I found some tools online which are either implemented in other languages or as commercial software. 我在网上找到了一些以其他语言或作为商业软件实现的工具。 Or matlab simply can not do it? 还是matlab根本做不到? Does anyone have any idea about this? 有人对此有任何想法吗?

The best tool for graph visualization is probably GraphViz: http://www.graphviz.org/ 图形可视化的最佳工具可能是GraphViz: http : //www.graphviz.org/

It can do basically whatever you want it to (within reason). 它基本上可以做任何您想做的事情(在合理范围内)。 We use it inside our toolboxes to do our graphical layouts. 我们在工具箱中使用它来进行图形布局。 And people use it to make pretty plots when they don't want to reinvent the wheel to do graph layouts (which are not trivial, especially for large graphs). 而人们用它来制作漂亮的情节时,他们不希望推倒重来做图形布局(这是平凡的,特别是对于大图)。

There's a google project to get GraphViz into MATLAB here: http://code.google.com/p/graphviz4matlab/ 有一个Google项目可以将GraphViz集成到MATLAB中: http : //code.google.com/p/graphviz4matlab/

I haven't used it, but it looks sweet. 我没有用过,但是看起来很甜。 It is released under GPL, so if that's a concern, a toolbox I've been working on: http://www.newfolderconsulting.com/prt/ has very limited support for graph visualization tools. 它是在GPL下发布的,因此如果有问题,我一直在使用的工具箱: http : //www.newfolderconsulting.com/prt/对图形可视化工具的支持非常有限。 eg 例如

prtPath('alpha');
connMat = [0 1 1 1 1 0; 1 0 1 0 1 0; 1 1 0 0 0 0; 1 0 0 0 0 0; 1 1 0 0 0 0; 0 0 1 0 0 0];
nodeNames = {'pete','kenny','sam','wiki','samantha','elena'};

graph = prtDataTypeGraph(connMat,nodeNames);
graph.plot; 
title('People (and dogs) Who Worked or Lived Together');

Internally, it also makes use of the GraphViz tools, but not through the google code project. 在内部,它也使用GraphViz工具,但不通过google code项目。

I can't stress enough how "alpha" the graph-visualization code in the PRT is. 我不能太强调PRT中图形可视化代码的“ alpha”程度。 If GPL is not an issue, the google code project looks like a pretty good solution. 如果GPL不是问题,那么Google代码项目看起来是一个很好的解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM