I would like to create certain graphs in Tikz with a given node distance. I tried:
\documentclass{amsart}
\usepackage{tikz}
\usetikzlibrary{graphs,graphdrawing,positioning,graphdrawing.layered}
\begin{document}
Setting the distance does not work:
\[
\begin{tikzpicture}[node distance=10pt]
\graph[nodes={draw,circle,minimum size=5pt,inner sep=0pt,as=}]
{ 1--[draw=gray]2--[draw=gray]3; 1--[bend left]3; };
\end{tikzpicture}
\]
Setting the distance works:
\[
\begin{tikzpicture}
\graph[layered layout,grow=right,level distance=10pt,nodes={draw,circle,minimum size=5pt,inner sep=0pt,as=}]
{ 1--[draw=gray]2--[draw=gray]3; };
\end{tikzpicture}
\]
Adding third edge changes layout:
\[
\begin{tikzpicture}
\graph[layered layout,grow=right,level distance=10pt,nodes={draw,circle,minimum size=5pt,inner sep=0pt,as=}]
{ 1--[draw=gray]2--[draw=gray]3; 1--[bend left]3; };
\end{tikzpicture}
\]
\end{document}
resulting in
Basically I want the first graph but with the node distance of the second graph. So my question is, how can I set the node distance in \graph
without specifying a layout (like the layered layout)?