答案1
正如约翰所说,这看起来更像是一个图表。如果你想把它画成一个图形,这是我的尝试:
\documentclass[x11names,svgnames,11pt]{article}
%
\usepackage{tikz}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}[scale=1]
\draw[->] (-5,0) -- (5,0) ;
\draw[->] (0,-1) -- (0,8) ;
\foreach \y in {0,1,2} {
\foreach \x in {-4,...,4} {
\draw[fill,red] (\x, \y) circle (1.3pt) ;
}
}
\foreach \y in {3,4} {
\foreach \x in {-3,...,3} {
\draw[fill,green!70!black] (\x, \y) circle (1.3pt) ;
}
}
\foreach \y in {5,6,7} {
\foreach \x in {-2,...,2} {
\draw[fill, blue!70!black] (\x, \y) circle (1.3pt) ;
}
}
\foreach \x in {-2.5,...,2.5} {
\node at (\x, 0.3) {$h$} ;
}
\foreach \y in {1.5,...,4.5} {
\node at (0.3, \y) {$k$} ;
}
\end{tikzpicture}
\caption{The finite difference grid.}
\end{figure}
\end{document}
该图如下所示: