我想制作一个grid
(单元格大小为 1cm x 1cm,网格总大小为 26cm x 17cm)因为tikz
tikz 可以精确控制大小。有关网格的详细信息,请参阅附图(是的,最终效果需要反转图像)。这对我来说有点难。有人可以帮我吗?谢谢。
\documentclass{article}
\usepackage{tikz,geometry}
\geometry{left=1cm,right=1cm,top=1cm,bottom=1cm}
\begin{document}
\begin{tikzpicture}
\draw (0,0) grid +(26,17);
\end{tikzpicture}
\end{document}
答案1
用于\foreach
标签和刻度。
\documentclass{article}
\usepackage{tikz,geometry}
\geometry{left=1cm,right=1cm,top=1cm,bottom=1cm,paperwidth=29cm}
\begin{document}
{\noindent
\begin{tikzpicture}[xscale=-1,transform shape]
\draw [gray!10] (0,0) grid +(27,18);
\draw [black!80] (1,0) grid +(26,17);
\foreach \lt [count=\n from 1] in {Q,...,A}
\node at (0.5,\n-0.5) {\lt};
\foreach \num [count=\n from 2] in {1,...,26}
\node at (\n-0.5,17.5) {\num};
\foreach \loc in {1.2,1.4,...,26.8}
\draw (\loc,6) -- +(0,0.15);
\foreach \loc in {1,...,27}
\draw [very thick] (\loc,6) -- +(0,0.25);
\foreach \loc in {0,0.2,...,16.8}
\draw (14,\loc) -- +(-0.15,0);
\foreach \loc in {0,...,17}
\draw [very thick] (14,\loc) -- +(-0.25,0);
\end{tikzpicture}}
\end{document}