2

As the title say, can a node and a coordinate be placed on the same line?

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
  \coordinate (P1) at (-2, 0);
  \coordinate (P2) at (2, 0);
  \draw (P1) -- (P2);
  \draw[-latex] (P1) -- ++(-88.2036:1.75cm) node[scale = .75, pos = .5,
  fill = white, shape = circle, inner sep = 0cm] {\(\nu_2\)};
  \draw[-latex](P1) -- ++(-20:5cm) node[scale = .75, pos= .5,
  fill = white, inner sep = 0cm, shape = circle] {\(v_2 = 12.9005\)};
\end{tikzpicture}
\end{document}

Can I add a coordinate to end of (P1) -- ++(-88.2036:1.75cm)? I couldn't find anything with a search or in the manual.

0
3

You can add a coordinate directly after the node or directly before it.

Code

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
  \coordinate (P1) at (-2, 0);
  \coordinate (P2) at (2, 0);
  \draw (P1) -- (P2);
  \draw[-latex] (P1) -- ++(-88.2036:1.75cm)
     node[scale = .75, pos = .5, fill = white, shape = circle, inner sep = 0cm] {\(\nu_2\)}
     coordinate (here);
  \draw[-latex] (P1) -- ++(-20:5cm)
     coordinate (there)
     node[scale = .75, pos= .5, fill = white, inner sep = 0cm, shape = circle] {\(v_2 = 12.9005\)};
  \draw[blue] (here) -- (there);
\end{tikzpicture}
\end{document}

Output

enter image description here

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.