2

I am looking for some package that handles graphs in python or C or C++. There are quite a few out there, as found in Google. But that is why I come here...

Handling graphic representations and stats is a plus, of course.

I would likely not need to develop/implement algoithms, etc. But I would most likely need to modify code to suit my needs, in minor aspects.

Any recommendation?

Thanks

  • 1
    What do you mean by "handles graphs"? And are you looking to develop something on your own, or something for end-users? – einpoklum Jul 22 '16 at 7:08
  • @einpoklum - As of now, I am not certain about the reach of my work. If a definition is demanded, I would say that I am an end-user at this point. – sancho.s Jul 22 '16 at 9:00
  • You have to edit your question to say that, and to give at least one concrete example of what you intend to be doing. Also, if you're an end user - why would you care about the language? – einpoklum Jul 22 '16 at 9:04
  • @einpoklum - End-user means for me that I would likely not need to develop/implement algoithms, etc. But I would most likely need to modify code to suit my needs, in minor aspects. – sancho.s Jul 22 '16 at 9:08
2

To handle graphs data structures in Python there is the popular networkx.

Another simpler and effective library is Altgraph (that I use and contribute to)

  • I have found NetworkX, and it seems to be somewhat popular. Do you have any comments, on pros and cons, maturity, etc.? Same for Altgraph. – sancho.s Jul 28 '16 at 9:07
  • 1
    It is full featured. Never a bad choice. I preferred altgraph for simpler hacking – Philippe Ombredanne Jul 28 '16 at 9:08
0

I code both Python & C++ (and a few others), and I eschew drag & drop, GUI based, tools in favour of those which take their input from a text file. That makes it easy for me to develop programs to generate the input text file from my own data.

You may not want to do that, but it is still worthwhile looking at GraphViz.

As an example:

graph { 
    a -- b; 
    b -- c; 
    a -- c; 
    d -- c; 
    e -- c; 
    e -- a; 
} 

generates
enter image description here

Obviously, it can produce much more complex diagrams that that, but that shows the principle - a simple text language to describe the relationship between nodes.

Take a look at their gallery to see how powerful it is.

GraphViz has been around for a long time, is well supported, has an active forum and is widely used in academia and in some popular tools like DoxyGen.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.