[Tex/LaTex] Changing grid size in tikz-timing package

gridstikz-pgftikz-timing

The grind in the figure contain a grid of 2×8 squeezers (2 rows and 8 columns) and I use 4 elements.

Example

How could I tell tikz-timing to use a grid of 1×4 squeezers?

Below is an example of my code:

\documentclass{standalone}
\usepackage{tikz-timing}
\usetikztiminglibrary{nicetabs}  

\begin{document}
 \begin{tikztimingtable}
   & 4L\\ 
   & 4H\\ 
   & CCCC \\ 
   & [C]CCCC \\
   & 2{2C} \\
   \extracode
   \tablegrid[black!25]
 \end{tikztimingtable}
\end{document}

Best Answer

\tablegrid uses the grid command of TikZ, which is controlled by the step setting. There is also xstep and ystep if you want to set the grid step size different for each axis. In your case you want to set step=1. The default is step=.5.

\documentclass[border=5pt]{standalone}
\usepackage{tikz-timing}
\usetikztiminglibrary{nicetabs} 

\begin{document}
 \begin{tikztimingtable}
   & 4L\\ 
   & 4H\\ 
   & CCCC \\ 
   & [C]CCCC \\
   \extracode
   \tablegrid[black!25,step=1]
 \end{tikztimingtable}
\end{document}

Result