# How to label the nodes ( coordinates ) in tikz picture?

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{quotes,angles}

\begin{document}

\begin{tikzpicture} %[scale=3]
\draw (0,0) node[below]{$O$} circle (2);
\coordinate (A) at (120:2);
\coordinate (B) at (210:2);
\coordinate (C) at (-40:2);
\coordinate (D) at ( 60:2);
\draw (A) -- (C) -- (D) -- (B) -- (A);
\draw (B) -- (A) -- (C) pic [draw, angle radius=12mm, "$30^\circ$"] {angle = B--A--C};
\draw (D) -- (B) -- (A) pic [draw, angle radius=15mm, "$15^\circ$"] {angle = D--B--A};
\draw (B) -- (D) -- (C) pic [angle radius=12mm, "$x^\circ$", draw] {angle = B--D--C};
\end{tikzpicture}
\\

\begin{tikzpicture} %[scale=3]
\draw (0,0) node[below]{$O$} circle (2);
\node (A) at (120:2) [above right] {$A$};
\node (B) at (210:2) [below left ] {$B$};
\node (C) at (-40:2) [above right] {$C$};
\node (D) at ( 60:2) [above right] {$D$};
\draw (A) -- (C) -- (D) -- (B) -- (A);
\end{tikzpicture}

\end{document}


How do I label the ABCD coordinates properly (in the first picture)?

Could I use \node as them can be labelled?

Thanks!

• Do you want to put "A", "B", "C", "D" labels on the first picture? May 25, 2015 at 16:11
• @user4035 Sorry if I was not clear. Yes, that's exactly what I want. May 25, 2015 at 16:12

I used the positioning library:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{quotes,angles,positioning}

\begin{document}

\begin{tikzpicture}
\draw (0,0) node[below]{$O$} circle (2);
\coordinate (A) at (120:2);
\node at (A) [above = 1mm of A] {$A$};
\coordinate (B) at (210:2);
\node at (B) [below left = 1mm of B] {$B$};
\coordinate (C) at (-40:2);
\node at (C) [below = 1mm of C] {$C$};
\coordinate (D) at ( 60:2);
\node at (D) [above right = 0.7mm of D] {$D$};
\draw (A) -- (C) -- (D) -- (B) -- (A);
\draw (B) -- (A) -- (C) pic [draw, angle radius=12mm, "$30^\circ$"] {angle = B--A--C};
\draw (D) -- (B) -- (A) pic [draw, angle radius=15mm, "$15^\circ$"] {angle = D--B--A};
\draw (B) -- (D) -- (C) pic [angle radius=12mm, "$x^\circ$", draw] {angle = B--D--C};
\end{tikzpicture}
\end{document}


You can directly give labels to the coordinates in your first picture, which I guess is the most natural way:

\documentclass[tikz, convert={density=300,size=256,outext=.png}]{standalone}
\usetikzlibrary{quotes,angles}

\begin{document}
\begin{tikzpicture} %[scale=3]
\draw (0,0) node[below]{$O$} circle (2);
\coordinate[label=above:A] (A) at (120:2);
\coordinate[label=below left:B] (B) at (210:2);
\coordinate[label=below right:C] (C) at (-40:2);
\coordinate[label=above:D] (D) at ( 60:2);
%\draw (A) -- (C) -- (D) -- (B) -- (A);
\draw (B) -- (A) -- (C) pic [draw, angle radius=12mm, "$30^\circ$"] {angle = B--A--C};
\draw (D) -- (B) -- (A) pic [draw, angle radius=15mm, "$15^\circ$"] {angle = D--B--A};
\draw (B) -- (D) -- (C) pic [angle radius=12mm, "$x^\circ$", draw] {angle = B--D--C};
\end{tikzpicture}
\end{document}


By the way, you don't need to draw your lines the first time.

\begin{tikzpicture}[scale=1.5]
\coordinate[label=above left:$A$] (A) at (0,2);
\coordinate[label=below left:$B$] (B) at (0,0);
\coordinate[label=below right:$C$] (C) at (3,0);
\draw (A) -- (B) -- (C) -- cycle;
\coordinate[label=above right:$P$] (P) at (1.5,1);
\draw (B) -- (P);
\coordinate[label=above right:$Q$] (Q) at (1.5,2);
\draw (P) -- (Q);
\coordinate[label=below right:$R$] (R) at (3,1);
\draw (P) -- (R);
\end{tikzpicture}

• Welcome. // Please never post a fragment alone, which will never compile when we copy and try ... Thank you Feb 14 at 12:28