0

For the TikZ grid command, I am wondering why the leftmost line is missing from the second grid that I am drawing below when I specify a step and do not start at (0,0).

enter image description here

\documentclass{article}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture} \draw[blue] (0,0) grid[step=5mm] (3,3); \draw[red] (4,0) grid[step=5mm] (7,3); \draw[green!50!black, xshift=8cm] grid[step=5mm] (3,3); \end{tikzpicture}

\smallskip \begin{tikzpicture} \draw[blue] (0,0) grid (3,3); \draw[red] (4,0) grid (7,3); \draw[green!50!black, xshift=8cm] grid (3,3); \end{tikzpicture}

\end{document}

tgkolda
  • 704

1 Answers1

0

enter image description here

edit as below

  \draw[red] (4-0.001,0-0.001) grid[step=5mm] (7,3);

MWE

\documentclass{article}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture} \draw[blue] (0,0) grid[step=5mm] (3,3); \draw[red] (4-0.001,0-0.001) grid[step=5mm] (7,3); \draw[green!50!black, xshift=8cm] grid[step=5mm] (3,3); \end{tikzpicture}

\smallskip \begin{tikzpicture} \draw[blue] (0,0) grid (3,3); \draw[red] (4,0) grid (7,3); \draw[green!50!black, xshift=8cm] grid (3,3); \end{tikzpicture}

\end{document}

js bibra
  • 21,280