# Changing grid size in tikz-timing package

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

How could I tell tikz-timing to use a grid of 1x4 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}

-
Note that you have an error in your example. The & 12{2C} C \\ line is ignored with a warning raised. You miss a \\ in the line above. Also code lines 3-5 are not really required for this example. Example should usually be as minimal as possible. –  Martin Scharrer May 3 '12 at 18:45
you are right, i removed it at my new example, below edit –  Eagle May 3 '12 at 19:33
Your update is a completely new question (like "How to use tikz-timing together with the external library") and has nothing to do with the grid. I suggest removing this part again and post it as a fresh question of its own. You can link back to this question if you want, but it isn't really required in this case. –  Martin Scharrer May 3 '12 at 19:40
ok, done. Thanks for your comments –  Eagle May 3 '12 at 21:56

\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}


-