答案1
你可以利用 Tikz 来实现你发布的图像。结果如下
上述输出的代码是
\documentclass[border={10pt}]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
[%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dot/.style={circle,draw=black, fill,inner sep=1pt},
line/.style={-latex,thick}
]%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\draw[step=1cm,gray,dashed] (-1,-1) grid (7,7);
\foreach \x in {0,...,6}{
\foreach \y in {0,...,6} {
\node[dot] at (\x,\y){ };
}}
\draw[line,green] (0,2) -- node[above,xshift=-2mm]{$u_2$}(1,4);
\draw[line,green] (0,2) -- node[above,xshift=-1mm]{$u_1$}(3,4);
\draw[line,red] (3,1) -- node[left]{$v_2$}(3,2);
\draw[line,red] (3,1) -- node[below]{$v_1$}(4,1);
\end{tikzpicture}
\end{document}