The problem of drawing hexagonal grids has been discussed here: Drawing Hexagons
I want the shape of the grid to be hexagonal and furthermore, I want to be able to add numbers in the hexagonal cells. Any idea?
The problem of drawing hexagonal grids has been discussed here: Drawing Hexagons
I want the shape of the grid to be hexagonal and furthermore, I want to be able to add numbers in the hexagonal cells. Any idea?
I'm not sure I understood correctly the question. I forgot to add name at each cell.
Update
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes}
\begin{document}
\begin{tikzpicture} [hexa/.style= {shape=regular polygon,regular polygon sides=6,minimum size=1cm, draw,inner sep=0,anchor=south,fill=lightgray!85!blue,rotate=30}]
\foreach \j in {0,...,5}{%
\pgfmathsetmacro\end{5+\j}
\foreach \i in {0,...,\end}{%
\node[hexa] (h\i;\j) at ({(\i-\j/2)*sin(60)},{\j*0.75}) {};} }
\foreach \j in {0,...,4}{%
\pgfmathsetmacro\end{9-\j}
\foreach \i in {0,...,\end}{%
\pgfmathtruncatemacro\k{\j+6}
\node[hexa] (h\i;\k) at ({(\i+\j/2-2)*sin(60)},{4.5+\j*0.75}) {};} }
\foreach \k in {0,...,10} {\node [circle,red,minimum size=1cm] at (h3;\k) {3;\k};}
\foreach \k in {0,...,10} {\node [circle,blue,minimum size=1cm] at (h1;\k) {1;\k};}
\end{tikzpicture}
\end{document}

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes}
\begin{document}
\begin{tikzpicture} [hexa/.style= {shape=regular polygon,
regular polygon sides=6,
minimum size=1cm, draw,
inner sep=0,anchor=south,
fill=lightgray!85!blue}]
\foreach \j in {0,...,9}{%
\ifodd\j
\foreach \i in {0,...,9}{\node[hexa] (h\j;\i) at ({\j/2+\j/4},{(\i+1/2)*sin(60)}) {\j;\i};}
\else
\foreach \i in {0,...,9}{\node[hexa] (h\j;\i) at ({\j/2+\j/4},{\i*sin(60)}) {\j;\i};}
\fi}
\node [circle,draw,red,minimum size=1cm] at (h3;4){};
\end{tikzpicture}
\end{document}

Not very pretty, but with the code in this answer, numbers can be added if you calculate the coordinates:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[x=1cm,y=-1cm]
\foreach \i in {0,...,3}
\foreach \j in {0,...,3} {
\foreach \a in {0,120,-120} \draw (3*\i,2*sin{60}*\j) -- +(\a:1);
\foreach \a in {0,120,-120} \draw (3*\i+3*cos{60},2*sin{60}*\j+sin{60}) -- +(\a:1);}
\foreach \i in {0,...,3}
\foreach \j in {0,...,3} {
\node at (3*\i+2,2*sin{60}*\j) {\small $\i^+,\j$};
\node at (3*\i+0.5,2*sin{60}*\j+sin{60}) {\small $\i,\j$};}
\end{tikzpicture}
\end{document}

So, if you just want to number some of the hexagons, that may be good enough.
tikz version 1.76 (2010/10/13)
– Jellby
Jun 27 '12 at 16:47
[x=1cm,y=-1cm]? Use smaller dimensions (I guess, I haven't tried).
– Jellby
Oct 02 '17 at 13:14