答案1
matrix of math nodes
以下是使用from 的一种方法蒂克兹:
\documentclass[border=5mm,tikz]{standalone}
\usepackage{mwe}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}[]
\matrix (M)[matrix of math nodes,nodes in empty cells]{
f & 0 & 1 & 2 & 3 & \\
0 & 0 & 0 & 1 \\
1 & 3 & 0 & 2 \\
2 & \\
3 & \\
& \\
};
\draw[->] (M-2-2.north west)-- ++(2,0) node[above right]{$x$};
\draw[->] (M-2-2.north west)-- ++(0,-2) node[below left ]{$y$};
\end{tikzpicture}
\end{document}
得出的结果为: