Graph generation tool - graph

Is there a free tool out there that would allow me to generate a directed/undirected weighted graph?
I'm thinking about something that I can draw the graph on some sort of canvas and then save it in a file in adjacency list format or egde list format, or any other common format.

Have you hear about Neo4j? Check it out maybe it's what you need:
http://www.neo4j.org/
This is Wikipedias definition:
Neo4j is an open-source graph database, implemented in Java. The developers describe Neo4j as "embedded, disk-based, fully transactional Java persistence engine that stores data structured in graphs rather than in tables".

If you're using Java (or Jython or other Java-compatible language) and want a Swing graphical component, JGraphX is a decent library, though this may be higher-level than what you want (since the adjacency list/matrix is a detail internal to the library).
JGraph is also available in .NET, PHP, and JS.
Code: https://github.com/jgraph/jgraphx
Documentation: http://jgraph.github.io/mxgraph/

I find something: Gephi.
I can draw a graph and save/export it in multiple formats.
Hope this answer helps others.
http://gephi.github.io/

Although asking for tools is off-topic at Stack Overflow, I can recommend Bandage for visualization of sequence assemblies.

Related

How to visualize a graph data structure?

I'm looking for a way to plot or visualize a graph made in Erlang using the digraph module. In the manual pages I can't find any function for doing this.
How do I plot or visualize a graph?
For desktop application, pure wx is one choice.
[wx graph] [1]https://www.erlang.org/doc/man/wxgraphicspath
I think you have to write many program for developing your necessary api because wx's api not enough.
I have used wx just before, erlang's wx is not active. It's document's and Q&A is not enough, Time cost is high.
Another choice may be to use wx + webview, send the data to javascript to show graph by it.
It save your save to develop above mentioned necessary api.
Third choice may be to use dart/flutter as client, erlang as server to send data. In this choice, no need wx.

NetworkX vs GraphDB: do they serve similar purposes? When to use one or the other and when to use them together?

I am trying to understand if I should use a GraphDB for my project. I am mapping a computer network and I use NetworkX. The relationships are physical or logical adjacency (L2 and L3) . In the current incarnation my program scans the network and dumps the adjacency info in a Postgress RDB. From there I use Python to build my graphs using NetworkX.
I am trying to understand if I should change my approach and if there is any benefit in storing the info in a GaphDB. Postgress has AgensGraph which seems to be built on top of Postgress as a GraphDB overlay or addon. I don not know yet if installing this on top will make my life easier. I barely survived the migration from SQLite to Postgress :-) and to SQLAlchemy so now in not even 3 months I am reconsidering things while I can (the migration is not complete)
I could chose to use a mix but I am not sure if it makes sense to use a GraphDB. From what I understand these has advantages as not needing a schema (which helps a lot for a DB newbie like me)
I am also wondering if NetworkX (Python librayr) and GraphDB overlap in any way. As far as I understand these things NetworkX could be instrumental in analyzing the topology of the graph while GraphDB is mainly used to query the data stored in the DB. Do they overlap in anyway? Can they be used together?
TLDR: Use Neo4j or OrientDB to store data and networkx for processing it (if you need complicated algorithms). It will be the best solution.
I strongly don't recommend you to use GraphDB for your purposes. GraphDB is based on RDF that is used for semantic web and common knowledge storage. It is not supposed to be used with problems like yours. There are many graph databases that will fit to you much better. I can recommend Neo4j (the most popular graph database, as you can see; free, but non-open-source) or OrientDB (the most popular open-source graph database).
I used graph database when I had a similar problem (but I used HP UCMDB, that is corporate software and is not free). It was really MUCH better than average relational DBs. So the idea of graph database usage is good and it fits to this kind of problems naturally.
I am not sure you really need networkx to analyze the graph (you can use graph query languages to it), but if you want, you can load the data from your DB to networkx with GraphML or some another methods (OrientDB is similar) to process it using networkx.
And the little question-answer quiz in the end:
As far as I understand these things NetworkX could be instrumental in analyzing the topology of the graph
Absolutely right.
while GraphDB is mainly used to query the data stored in the DB.
It is a database. And, yes, it is mainly used to query the data.
Do they overlap in anyway?
They are both about graphs. Of course they overlap :)
Can they be used together?
Yes, they can. No, they should not be used together for your problem.

Neo4j graph visualizing libraries

Recently I explored some libraries where I can visualize graphs from Neo4j, but didn't get a clear view wich one to choose, so I have a couple thought I'd like to share.
My requirements and wishes - after search throught REST API with cypher query visualize graphs with all relationships, nodes. And result make interactive - able to drag/drop... opportunity to reveal other nodes/rels on click. Import nodes throught json data and be able to show quickly up to at least 400 elements.
So I more or less explored further libraries:
Three.js - mostly for 3D. (If I don't need 3D then better not to choose this one)
Arbor.js - drawing leaves up to you, mostly layout library
VivaGraphJS - easy to use, but almost no documentation :(
D3.js - Looks fine, but uses SVG
Cytoscape.js - looks fine, but I read that I can't use it with Neo4j. Is D3.js the right choice for real-time visualization of Neo4j Graph DB data why?
Processing.js - have it's own language similar to Java. I'm not so much in Java-like language (yet).
And I have a couple questions:
1) Whats your experience - benefits, weakneses of libraries?
2) I suppose I want to use canvas insted of SVG? (a lot of small elements on the screen).
3) Arbor is special library for layout, but others don't have layout algorithms or what?
I'll appreciate any opinion! :-)
I pondered a similar situation. I chose sigma.js.
1) Whats your experience - benefits, weakneses of libraries?
sigma.js is specific to graph rendering. d3 is a full on toolbox for visualization. Since I only want to draw graphs, the concise sigma.js interface was easier to work with. I think this is the video where the creator talks about how sigma.js is able to do incremental rendering and thus perform better and handle more vertices/edges smoothly.
2) I suppose I want to use canvas insted of SVG? (a lot of small
elements on the screen).
sigma.js renders to the canvas.
Here are the sigma.js examples. The "hide nodes" example shows mouse interactions. Additionaly, here is a blog post showing how one can easily integrate neo4j w/ sigma using a very minimal amount of data massaging code written in node.js. It would be easy to port this to any server language.
I don't see sigma.js in that list which you might want to take a look at as it is very useful (example)
You will have to somehow handle the rendering of the received data (i.e. go from a data structure to its visual representation) and this depends on what are you trying to show / say with that visualisation, how you want to do it and how you want it to look like.
As a starting point, i would go with D3 and Sigma.
I note that Gephi is not on your list. As a standalone visualiser/editor, its the best that I have used (you just get the neo4j plugin, and it will import the source files of the database and let you view it). Its also Open Source, so you can include it as part of a project.
Also missing from your list is the yFiles family of graph visualization libraries.
The JavaScript variant of if uses both Canvas, WebGL, and SVG. This can give very good performance and high-quality visualizations at the same time. For hair-ball-like graphs (thousands of dots and lines, but probably no text) you can use WebGL and Canvas and when you zoom in to actually make sense of the data, you can use SVG to get detailed high-quality visualizations with labels, icons, data-bound visualizations, etc. You can use both techniques in the same visualization, even at the same time, benefiting from the best of both worlds (demo).
Connecting yFiles to Neo4j is easy using the JavaScript Bolt driver.
Aiming at 400 elements in the view is a good idea. While larger graphs tend to look really nice, most of the time you won't gain a lot of insights by looking at "hair-balls". These almost artistic visualizations all look very similar and as such carry little to no information. Often you could just as well display a static image showing the first google image search hit for a "hairball graph" query :-)
In order to better support the user during exploration, filtering, grouping, nesting, and dynamic interaction should be added to the viewer application. How this can be implemented, very much depends on the business domain in the visualization, though and there are only very few generic approaches that work for generic graphs.
Disclaimer: I work for the company that creates the above mentioned visualization library. I do not represent it on SO, though.

Trees / Graphs, How to represent Multiple parents and children?

I'm hoping you can help me out with some technical questions on graphs/trees.
I'm trying to display the creation of objects in systems.
It's really a tree structure.
It has some interesting requirements.
a)
One node can have many children. Say 20. Maybe more.
ie. one library can be used by many objects.
b)
A child node can have many parents. Say up to 20.
ie. many libraries are used by one procedure or object
c)
A particular node can appear in more than one place.
ie. a generic print, or logging function is called in many procedures
Note: This is just an -example- in tech terms I expect you will understand.
It is NOT the issue I need to model. No need to discuss it.
As I've thought about it, I realized that it's not a simple binary tree, or a linked list.
1)
What kind of data structure could I save all the data in?
2)
How could I produce a graph of this in java?
3)
What is a free open source graphing software that could graph such a tree?
Such as Neo4j
Perhaps in formats:
- as a tree, with a root, trunk, branches, and leaves?
- Like the graphs you see now, depicting social networks, with the root node in the center?
4)
Any good websites, or tutorials on this subject?
Thanks a lot!
Check out prefuse. It's old but it works. You'll have to invest a bit of time to learn how to use it though. Once you get there, it's just a matter of creating a prefuse.data.Graph object and fill in your nodes and their neighbors and then creating the visualization.
If you're open to other solution check out d3.js - draw graph using javascript on SVG element in your browser.
If this is really about objects, then maybe UML can help. It's designed to generate graphs of object relationships. There are tons of free UML tools out there. I'd download one and see if you can shoehorn your application into it.
JGraphT can represent your graph structure and can use JGraph for visualisation.
For an example visualization, look at this.

Data Visualisation

UPDATE: I had posted this on UI.stackexchange also for views on different kinds od visualisation. I am posting this here for finding out the programming techniques and tools required to do so.
Let us have the following three sets of information
Now I want to combine all of this data and show it all together. Telling it like a story. Giving inter-relations. Showing similarities in terms, concepts etc. to get the following (Note that in the diagram below, the colored relations may not be exact, they are merely indicative of a node of information)
Situation: I need to tell somebody the relation between two or more important things through the commonness of concepts, keywords, behaviours in those things.
One way that I figured out would be to use circles for concepts.
So that all concepts connected to thing A would be connected to it and all concept related to B would be connected to it. And the common concepts would be connected to both. That way 2 things can be easily compared.
Problem: To build such a graph/visualisation manually would be cumbersome. Especially to add, arrange, update and manipulate.
Question: Is there a good way to do it. Also, Is there a tool available for doing this?
I hope this make the question much more clear. :)
Where does this data (the concepts, keywords, and relations between them etc...) come from? If it's in a database somewhere you could write soem code to generate a graphiz file then open it in a graphiz visualizer. There might be some tools out there that allow interactive editing of a graphiz graph, it looks like WebDot may and there are probably others.
How to display the hierarchical data on User Interface
You're talking about Venn diagrams. I think there should be plenty of online and offline tools that can help making these.
graphiz has been mentioned already, although that would be used more to show a flow of a system, or a treeview.
When you're talking about software development and want to display a design through diagrams, a complete diagram solution already exist as UML. And there are plenty of UMT tools that can help here. A commercial version is Altova UModel, which has some very nice features. You could probably use Use Cases as the most logical diagram type.
Also see Wikipedia for more info about use case diagrams. Reconsidering the image you've added, I do tend to consider it to be a usecase. Since UML is based on XML, it should be possible to transform your data through a stylesheet to UML, then use a random UML tool to display the diagrams.To convert your data to XML, well... If it's in Excel then exporting it to XML should not be too difficult.
Why is your sample image an Use Case? Well, you have actors (Pinguin, Koala, Tulips) and you have actions. (well, kind of actions: Cause for concern, some kind of animal, linked to movie, bites your nose off...) And finally, there are associations between the actors and the actions connecting them all in some way. Thus Data--(export)->XML--(Styleheet)->UML--(UML tool)->Diagram.
D3: Data-Driven Documents JS library

Resources