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>
  • To: Prathyusha Meka <mekaprathyusha AT>
  • Cc: "graphstream-users AT" <graphstream-users AT>
  • Subject: Re: how can I display 20,000 nodes in graph
  • Date: Thu, 19 Feb 2015 16:23:22 +0100


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.


2015-02-18 21:27 GMT+01:00 Prathyusha Meka <mekaprathyusha AT>:

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.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());
Edge e = graph.getEdge(edgevalue);
int weight = e.getAttribute("layout.weight");
e.setAttribute(edgevalue, Integer.toString(weight));

Edge e = graph.addEdge(edgevalue, currentStudent, currentNextStudent);
e.addAttribute("weight", numberofinteractions);


I attached my output graph for your reference.


On Feb 18, 2015, at 11:02 AM, guilhelm savin <guilhelm.savin AT> wrote:


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.


2015-02-18 7:51 GMT+01:00 <mekaprathyusha AT>:

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

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