Is there any latex package to draw graphs by its descriptive relations. Lets say:
\draw_graph_complete{5}{1}
Or
\draw_graph{u,v,x,y,z}{{u,v}{v,x}{x,z}{y,z}}
I don't want to deal with placement coordinates or stuff like that.
So far I have found the tikz
libraries as graphs
and graphs.standard
.
For example this MWE.
\documentclass[a4paper]{article}
\usepackage{tikz}
\usetikzlibrary{graphs, graphs.standard}
\begin{document}
\begin{tikzpicture}
\graph[nodes={circle, draw}, grow right=2cm, branch down=2cm]{
b,
a -- {b,c},
c -- {b},
e -- {a,d},
d -- {c}
};
\end{tikzpicture}
\end{document}
gives a nice graph, but lacks symmetry in the node b
. I can live with that, but looking for alternatives.
graphs.standard
do what you need? (I realize it doesn't for the non-standard graph that you provided in your code.)tkz-graph
, andtkz-berge
packages and you should look intosagetex
with Sage. Links are provided to get you started.