Is there any solution for drawing simple graphs in LaTeX like the following? I came across tikz but couldn't figure out how to do it. Are there also possibilities to extend such graphs without caring too much about node distances etc?

enter image description here

  • One option: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes,positioning} \tikzset{ myell/.style={ draw, ellipse } } \begin{document} \begin{tikzpicture}[node distance=1cm and 2cm] \node[myell] (sub) {Subject}; \node[myell,right=of sub] (obj) {Object}; \draw[->] (sub) -- node[above]{Predicate} (obj); \end{tikzpicture} \end{document}. Jun 11, 2014 at 18:49
  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – user31729
    Jun 11, 2014 at 19:07
  • You might even be interested in Drawing relationships between elements of a database. Jun 12, 2014 at 7:24


Browse other questions tagged or ask your own question.