荣格如何从网络文件quato显示顶点标签

时间:2013-07-22 15:09:44

标签: label vertex jung

我有一个像这样的网络文件:

1 "assurance"
2 "regime"
3 "Cambodia"
4 "talks"
5 "freedom"
6 ""
7 "November"
8 "October"
9 "the_opposition"
10 "political"
...

我做了一个图表,但这个图表不显示“”中的单词 我该怎么做才能显示顶点标签?

1 个答案:

答案 0 :(得分:0)

我找到了答案

PajekNetReader<Graph<Number, Number>, Number, Number> pnr = 
    new PajekNetReader<Graph<Number, Number>, Number,Number>(
        vertexFactory, edgeFactory);
final Graph<Number,Number> graph = new SparseMultigraph<Number, Number>();
pnr.load(br, graph);
final AggregateLayout<Number,Number> layout = 
    new AggregateLayout<Number,Number>(new FRLayout<Number,Number>(graph));

vv = new VisualizationViewer<Number,Number>(layout);
vv.setBackground( Color.white );
vv.getRenderContext().setVertexLabelTransformer(pnr.getVertexLabeller());