2

Consider this example

\documentclass[12pt]{article}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}
\draw (0,1)..controls +(2,4) and +(-2,-6)..(4,0)
..controls  +(2,6) and +(-2,-6.5)..(8,0)coordinate[pos=0](A);

\draw[<-](A)--+(0,2)node[above]{A};
\end{tikzpicture}

\end{document}

enter image description here

Although I have mentioned pos=0 in coordinate[pos=0](A)! look like the path is divided into two paths ?

3

It's the defined behaviour. From section 17.8 Placing Nodes on a Line or Curve Explicitly:

enter image description here

Previous coordinate in your case is (4,0) and current point is (8,0), therefore pos=0 is at (4,0).

Following example shows the same case with a path built with two segments:

\documentclass[12pt]{article}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}
\draw (0,0) -- (3,1) -- (4,5) coordinate[pos=0] (A) coordinate[pos=0.5] (B) coordinate[pos=.75] (C);

\path (A) node {A};
\path (B)node {B};
\path (C)node {C};
\end{tikzpicture}

\end{document}

enter image description here

1

Technically these are two separate paths, but you can do

\documentclass[12pt]{article}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}
\draw (0,1)..controls +(2,4) and +(-2,-6)..(4,0) coordinate[pos=0](A)
..controls  +(2,6) and +(-2,-6.5)..(8,0);

\draw[<-](A)--+(0,2)node[above]{A};
\end{tikzpicture}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.