1

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

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

我做了一个图表,但是这个图表没有在“”中显示单词我应该怎么做才能显示顶点标签?

4

1 回答 1

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());
于 2013-07-23T14:29:27.517 回答