TikZ 图片的字幕

TikZ 图片的字幕

我想在以下代码中将(子)标题放在等式右侧的图表下。例如,我想将它们标记为 (a) 到 (e)。

提前感谢你的帮助!

\documentclass[11 pt]{amsart}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{subfig}

\usetikzlibrary{calc}
\tikzstyle{hackennode}=[draw,circle,inner sep=0,minimum size=4pt]
\tikzstyle{hackenline}=[line width=3pt]

\begin{document}

\begin{figure}[h]
{\Large
\[
\begin{tikzpicture}[baseline=-0.65ex,scale=0.5]
    \draw[densely dashed] (-1,-1) -- (3,-1);
    \node[hackennode] (0) at (0,-1) {};
    \node[hackennode] (1) at (0,0) {};
    \node[hackennode] (2) at (0,1) {};
    \node[hackennode] (3) at (0,2) {};
    \draw[hackenline,blue] (0) -- (1) {};
    \draw[hackenline,red] (1) -- (2) -- (3) {};
    \node[hackennode] (10) at (1,-1) {};
    \node[hackennode] (11) at (1,0) {};
    \node[hackennode] (12) at (1,1) {};
    \node[hackennode] (13) at (1,2) {};
    \draw[hackenline,blue] (10) -- (11) {};
    \draw[hackenline,red] (11) -- (12) -- (13) {};
    \node[hackennode] (20) at (2,-1) {};
    \node[hackennode] (21) at (2,0) {};
    \node[hackennode] (22) at (2,1) {};
    \draw[hackenline,red] (20) -- (21);
    \draw[hackenline,blue] (21) -- (22);
\end{tikzpicture}
=
\left \{
    \begin{tikzpicture}[baseline=-0.65ex,scale=0.5]
        \draw[densely dashed] (-1,-1) -- (3,-1);
        \node[hackennode] (10) at (1,-1) {};
        \node[hackennode] (11) at (1,0) {};
        \node[hackennode] (12) at (1,1) {};
        \node[hackennode] (13) at (1,2) {};
        \draw[hackenline,blue] (10) -- (11) {};
        \draw[hackenline,red] (11) -- (12) -- (13) {};
        \node[hackennode] (20) at (2,-1) {};
        \node[hackennode] (21) at (2,0) {};
        \node[hackennode] (22) at (2,1) {};
        \draw[hackenline,red] (20) -- (21);
        \draw[hackenline,blue] (21) -- (22);
    \end{tikzpicture}
\tikz[baseline=-0.65ex,scale=0.5] \node[inner sep=0] at (0,-1) {,\,};
\begin{tikzpicture}[baseline=-0.65ex,scale=0.5]
    \draw[densely dashed] (-1,-1) -- (3,-1);
    \node[hackennode] (0) at (0,-1) {};
    \node[hackennode] (1) at (0,0) {};
    \node[hackennode] (2) at (0,1) {};
    \node[hackennode] (3) at (0,2) {};
    \draw[hackenline,blue] (0) -- (1) {};
    \draw[hackenline,red] (1) -- (2) -- (3) {};
    \node[hackennode] (10) at (1,-1) {};
    \node[hackennode] (11) at (1,0) {};
    \node[hackennode] (12) at (1,1) {};
    \node[hackennode] (13) at (1,2) {};
    \draw[hackenline,blue] (10) -- (11) {};
    \draw[hackenline,red] (11) -- (12) -- (13) {};
    \node[hackennode] (20) at (2,-1) {};
    \node[hackennode] (21) at (2,0) {};
    \draw[hackenline,red] (20) -- (21);
\end{tikzpicture}
\middle |
\begin{tikzpicture}[baseline=-0.65ex,scale=0.5]
    \draw[densely dashed] (-1,-1) -- (3,-1);
    \node[hackennode] (0) at (0,-1) {};
    \node[hackennode] (1) at (0,0) {};
    \node[hackennode] (2) at (0,1) {};
    \draw[hackenline,blue] (0) -- (1) {};
    \draw[hackenline,red] (1) -- (2)  {};
    \node[hackennode] (10) at (1,-1) {};
    \node[hackennode] (11) at (1,0) {};
    \node[hackennode] (12) at (1,1) {};
    \node[hackennode] (13) at (1,2) {};
    \draw[hackenline,blue] (10) -- (11) {};
    \draw[hackenline,red] (11) -- (12) -- (13) {};
    \node[hackennode] (20) at (2,-1) {};
    \node[hackennode] (21) at (2,0) {};
    \node[hackennode] (22) at (2,1) {};
    \draw[hackenline,red] (20) -- (21);
    \draw[hackenline,blue] (21) -- (22);
\end{tikzpicture}
\tikz[baseline=-0.65ex,scale=0.5] \node[inner sep=0] at (0,-1) {,\,};
\begin{tikzpicture}[baseline=-0.65ex,scale=0.5]
    \draw[densely dashed] (-1,-1) -- (3,-1);
    \node[hackennode] (0) at (0,-1) {};
    \node[hackennode] (1) at (0,0) {};
    \draw[hackenline,blue] (0) -- (1) {};
    \node[hackennode] (10) at (1,-1) {};
    \node[hackennode] (11) at (1,0) {};
    \node[hackennode] (12) at (1,1) {};
    \node[hackennode] (13) at (1,2) {};
    \draw[hackenline,blue] (10) -- (11) {};
    \draw[hackenline,red] (11) -- (12) -- (13) {};
    \node[hackennode] (20) at (2,-1) {};
    \node[hackennode] (21) at (2,0) {};
    \node[hackennode] (22) at (2,1) {};
    \draw[hackenline,red] (20) -- (21);
    \draw[hackenline,blue] (21) -- (22);
\end{tikzpicture}
\tikz[baseline=-0.65ex,scale=0.5] \node[inner sep=0] at (0,-1) {,\,};
\begin{tikzpicture}[baseline=-0.65ex,scale=0.5]
    \draw[densely dashed] (-1,-1) -- (3,-1);
    \node[hackennode] (0) at (0,-1) {};
    \node[hackennode] (1) at (0,0) {};
    \node[hackennode] (2) at (0,1) {};
    \node[hackennode] (3) at (0,2) {};
    \draw[hackenline,blue] (0) -- (1) {};
    \draw[hackenline,red] (1) -- (2) -- (3) {};
    \node[hackennode] (10) at (1,-1) {};
    \node[hackennode] (11) at (1,0) {};
    \node[hackennode] (12) at (1,1) {};
    \node[hackennode] (13) at (1,2) {};
    \draw[hackenline,blue] (10) -- (11) {};
    \draw[hackenline,red] (11) -- (12) -- (13) {};
\end{tikzpicture}
\right \} \]
}% End group with \Large
\caption{}
\end{figure}

\end{document}

答案1

我不确定你想要什么,但在轴下添加标签很容易,就像这样

\draw[densely dashed] (-1,-1) -- node[below] {b)} (3,-1);

结果是: 在此处输入图片描述

相关内容