# Draw a line starting from a given point using ++ together with a polar coordinate I'd like a line starting from the red point. Why is there a gap between them? I use the following code.

\begin{tikzpicture}
\draw[help lines] (0,0) grid (10,10);
\draw[very thick,rotate around={45:(2.3,5)}] (2.3,5) rectangle ++(4,0.3) ++(0,-0.15) node (p) {};
\fill[red] (p) circle (2pt);
\draw (p)--++(225:6);
\end{tikzpicture}


Thank you!

• Either replace node (p) {} by coordinate (p) or by node[inner sep=0pt,outer sep=0pt] (p) {}, or replace (p) by (p.center) in the \draw command. – gernot Apr 10 '17 at 11:54

The gap is due to the default value inner sep of the \node command for node (p) which is .3333em. Setting inner sep=0pt will remove the gap and reduce the node to a minimal size.

\documentclass[10pt]{article}

\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
\draw[help lines] (0,0) grid (10,10);
\draw[very thick,rotate around={45:(2.3,5)}] (2.3,5) rectangle ++(4,0.3) ++(0,-0.15) node[inner sep=0pt,outer sep=0pt] (p) {};
\fill[red] (p) circle (2pt);
\draw (p)--++(225:6);
\end{tikzpicture}
\end{document} or

\documentclass[tikz]{standalone}

\begin{document}
\begin{tikzpicture}
\draw[help lines] (0,0) grid (10,10);
\draw[very thick,rotate around={45:(2.3,5)}] (2.3,5) rectangle ++(4,0.3) ++(0,-0.15) coordinate (p);
\draw (p)--++(225:6);
\fill[red] (p) circle (2pt);
\end{tikzpicture}
\end{document}


gab is caused with ˙inner sep of node (default value is 3pt). You actualy have two possibilities:

• reduce inner sep of node, or
• instead node use coordinate as I suggested above 