Hello, Thanks for your response, Here is my code, Graph graph = new SingleGraph("StudentGraph"); String stylesheet = "node {"+ "shape: box;"+ " fill-color: white;"+ " size: 40px;"+ " stroke-mode: plain;"+ " stroke-color: blue;"+ " stroke-width: 1px;"+ "}”; graph.addAttribute("ui.quality"); graph.addAttribute("ui.antialias"); graph.addAttribute("ui.stylesheet", stylesheet); for(int i=0; i< 22300; i++){ Node currentNextStudent = graph.addNode(Integer.toString(i)); currentNextStudent.addAttribute("ui.label", Integer.toString(i)); inc = inc+45; currentNextStudent.addAttribute("xyz", 0.0, 0.0, inc); String edgevalue = Integer.toString(nodeiter.getStudentId()) + ": " + Integer.toString(nextNode.getStudentId()); if(edgeList.contains(edgevalue)){ Edge e = graph.getEdge(edgevalue); int weight = e.getAttribute("layout.weight"); weight++; e.setAttribute(edgevalue, Integer.toString(weight)); }else{ Edge e = graph.addEdge(edgevalue, currentStudent, currentNextStudent); e.addAttribute("weight", numberofinteractions); edgeList.add(edgevalue); } } graph.display(); } I attached my output graph for your reference. Thanks, Prathyusha ![]() On Feb 18, 2015, at 11:02 AM, guilhelm savin <guilhelm.savin AT gmail.com> wrote:
|
Archives gérées par MHonArc 2.6.16.