GraphStream Users

Archives de la liste Aide


Re: simple rendering not working


Chronologique Discussions 
  • From: Anishek Agarwal <anishek AT gmail.com>
  • To: guilhelm savin <guilhelm.savin AT gmail.com>, "graphstream-users AT litislab.fr" <graphstream-users AT litislab.fr>
  • Cc: "users AT graphstream-project.org" <users AT graphstream-project.org>
  • Subject: Re: simple rendering not working
  • Date: Fri, 08 Sep 2017 07:14:45 +0000

Thanks a lot, that helped.

I have another question, if in a graph i want it displayed such that, the rendering of graph should start at top with certain nodes i can identify and rest below it, how do i do that. I couldnt find a way to do this via CSS in graphstream and only way i can think of is using "xy" but not sure how to get them to around same level to start of with.

On Fri, Sep 8, 2017 at 3:31 AM guilhelm savin <guilhelm.savin AT gmail.com> wrote:
Hi Anishek,

I guess the documentation would be your best mate for this one : http://graphstream-project.org/doc/Tutorials/Creating-a-movie-with-FileSinkImages/
Do not forget to enable a layout.

Cheers.

2017-09-07 22:24 GMT+12:00 Anishek Agarwal <anishek AT gmail.com>:
Hello,

I am trying to render a simple graph with the code below
SingleGraph graph = new SingleGraph("test");
graph.addNode("1");
graph.addNode("2");
graph.addNode("3");
graph.addNode("4");

graph.addEdge("e1", "1", "2");
graph.addEdge("e2", "1", "3");
// graph.addEdge("e3","2","4");
// graph.addEdge("e4","3","4");

FileSinkImages sink =
new FileSinkImages(FileSinkImages.OutputType.PNG, FileSinkImages.Resolutions.SVGA);
graph.write("/tmp/a.jpg");


 however all i am getting in the output JPG is a "dot"  as below. a.jpg



dependency is 

 <dependency>
    <groupId>org.graphstream</groupId>
    <artifactId>gs-core</artifactId>
    <version>1.3</version>
</dependency>

running on java 1.8 on mac OS Sierra

can someone help as to what am i doing wrong ?

thanks
anishek



--
Guilhelm Savin
Computer Science PhD



Archives gérées par MHonArc 2.6.16.

Top of page