GraphStream Users

Archives de la liste Aide


Re: how can I display 20,000 nodes in graph


Chronologique Discussions 
  • From: guilhelm savin <guilhelm.savin AT gmail.com>
  • To: Prathyusha Meka <mekaprathyusha AT gmail.com>
  • Cc: "graphstream-users AT litislab.fr" <graphstream-users AT litislab.fr>
  • Subject: Re: how can I display 20,000 nodes in graph
  • Date: Thu, 19 Feb 2015 16:23:22 +0100

Hi,

Please post a WORKING sample of code, so I could try to see what is your problem ! This one has a lot of missing part of code so it is not runnable.

Cheers.

2015-02-18 21:27 GMT+01:00 Prathyusha Meka <mekaprathyusha AT gmail.com>:
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:

Hi,

We need more informations about how you create your graph. Maybe a sample of code to reproduce your problem ?
Why do you use "layout.frozen" ? Because layout will not be computed for nodes and so no coordinate will be provided to the renderer.

Cheers.

2015-02-18 7:51 GMT+01:00 <mekaprathyusha AT gmail.com>:
Hello,

I created 20,000 nodes and edges for each other node but I can't see all the
nodes in the graph.

I am newbie to graphstream, I used
System.setProperty("org.graphstream.ui.renderer",
"org.graphstream.ui.j2dviewer.J2DGraphRenderer");

and also "layout.frozen" for each node, but it doesn't work.

All my nodes are forming into a circle and I am unable to see the edges.

Thanks for any help.



--
Guilhelm Savin
PhD of Computer Science




--
Guilhelm Savin
PhD of Computer Science



Archives gérées par MHonArc 2.6.16.

Top of page