2

Possible Duplicate:
LaTeX for Graph Theory?

For the first time, I was going to draw a graph in LaTeX. (I was intended for a graph similar to the following)

enter image description here

Graph Theory is an important topic in Computer Science so I thought graph-drawing in LaTeX should be trivial, i.e. a package is given the adjacency matrix of graph and it positions each node in its perfect place automatically without the user having to manually place each node. But after some googling I now feel graph drawing is probably a time consuming task in the TeX world.

Is it better to draw graphs with some graphic software and insert it as an image, or there is some better solution? (How do I balance the trade-off between elegant looks and time-efficiency?) Is there a software that allows you to draw a graph in a GUI and then generate LaTeX markup for that (I mean a graph specific app not a general one).

note: This is not a duplicate, please note to bold text.

  • 1
    A combination of R, the package igraph and tikzDevice might suffice. Or you could look at http://www.texample.net/tikz/ for examples using tikz. – mnel May 31 '12 at 6:25
  • There's an intriguing comment here: tex.stackexchange.com/a/17976/86 Generally, drawing graphs is quite complicated and whilst TeX is Turing complete, that doesn't mean that it is the best choice for implementing graph drawing routines. One option is to use Graphviz to lay out the graph and then render it using TikZ. This needs the dot2tikz program which is available via texample (which mnel has linked to). – Loop Space May 31 '12 at 7:05
  • @mnel consider texample.net/tikz/examples/cycle. It's a simplest graph example of that site, however it's still bulky. I think drawing should be through markup, not programming. – PHPst May 31 '12 at 7:07
  • 2
    possible duplicate of LaTeX for Graph Theory? and What GUI applications are there to assist in generating graphics for TeX?. Please try to ask only one concise question per post, and make sure they haven't been asked before. – doncherry May 31 '12 at 7:20
  • 2
    @doncherry First sentence of the first link : "What should I use to make Graphs for Graph Theory in LaTeX?" – Matsaya May 31 '12 at 10:46

Browse other questions tagged or ask your own question.