GraphStream Users

Archives de la liste Aide

Displaying large graphs

Chronologique Discussions 
  • From: Cherie Pun < AT>
  • To: graphstream-users AT
  • Subject: Displaying large graphs
  • Date: Tue, 12 Apr 2016 16:19:17 +0100


I am trying to display a graph with 457555 edges but it shows up as a single dot on my computer. If I limit to 5000 edges, it shows a graph as attached below. Is there a reason why it's doing this? I am using a hashmap to store the edges and the following code to construct the graph. Thank you very much for your help.
Inline images 1

Inline images 2
private static void displayGraph(HashMap<UserPair, TrustRelation> map) {
Graph graph = new SingleGraph("Trust");
graph.setAutoCreate( true );
graph.addAttribute("ui.stylesheet", STYLE_SHEET);
for(Map.Entry<UserPair, TrustRelation> entry : map.entrySet()){
UserPair up = entry.getKey();
TrustRelation tr = entry.getValue();
double strengthOfTrust = tr.computeConversationalTrust();
if (strengthOfTrust > 0) {
Edge edge = graph.addEdge(up.toString(), Integer.toString(up.getUserA()), Integer.toString(up.getUserB()));
edge.addAttribute("weight", strengthOfTrust);
edge.addAttribute("ui.class", "untrustworthy");
edge.addAttribute("ui.class", "trustworthy");
edge.setAttribute("ui.color", strengthOfTrust/4.0);


Kind regards,

Archives gérées par MHonArc 2.6.16.

Top of page