# tikz: grid corners

Apologies if this is a duplicate. It would seem like it would be a well-known problem, but I was unable to track a solution.

In words: the grid lines do not extend enough to form sharp corners. I would like sharp corners. Thanks.

\documentclass[border=1mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=1]
\draw (0, 0) grid (1, 1);
\end{tikzpicture}
\end{document}


I do not know why it is not default for grid, but it helps to set the line cap to rect.
\documentclass[border=1mm]{standalone}

• @PatrickT You can also try round (instead of rect). The initial value is butt for grid and for all other drawing operations as in PDF standard. – Paul Gaborit Jan 21 '19 at 14:27