0

When drawing a tikz graph, can I specify that a point (P) is a coordinate, rather than a node (G1, G2)? I would want to do this because I find coordinates are more precise than empty nodes, and there would be no gap in the line shown below. For example, could I specify something like this: G1 -- \makeCoordinate{P/} -- G2}

enter image description here

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning,graphs}
\begin{document}
\begin{tikzpicture}[inner sep = 0pt, outer sep = 0pt,]
    \path graph [grow right sep=2cm]{ G1 -- P/ -- G2};
\end{tikzpicture}
\end{document}

1 Answer 1

1

Maybe this would help you, is it what you expect ?

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning,graphs}
\begin{document}
\begin{tikzpicture}[inner sep = 0pt, outer sep = 0pt,]
    \path graph [grow right sep=2cm]{ G1 -- P[coordinate,label={below:$P$}]/ -- G2};
    \draw[->](G1)to[bend left](P);
\end{tikzpicture}
\end{document}

enter image description here

as such P seems to referenced as a coordinate node.

1
  • Of course it's something as simple as [coordinate], thanks! Commented Dec 8, 2020 at 18:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .