如何使用 Tikz 创建此图表(带有标签的方程式)?

如何使用 Tikz 创建此图表(带有标签的方程式)?

我不知道如何使用 Tikz 创建下图

我想过使用节点,但我不确定我们该如何去做......

在此处输入图片描述

答案1

朝着正确方向迈进的一些建议——改编自

http://www.texample.net/tikz/examples/global-nodes/

在此处输入图片描述

\documentclass{article}

\usepackage{tikz}
\usepackage{amsmath}
\usetikzlibrary{arrows}
\begin{document}
\pagestyle{empty}

% For every picture that defines or uses external nodes, you'll have to
% apply the 'remember picture' style. To avoid some typing, we'll apply
% the style to all pictures

\tikzstyle{every picture}+=[remember picture]

% By default all math in TikZ nodes are set in inline mode. Change this to
% displaystyle so that we don't get small fractions

\everymath{\displaystyle}

\begin{itemize}
    \item Physical Experiment Response
        \tikz\node [fill=blue!20,draw,circle] (n1) {};
\end{itemize}

% Below we mix an ordinary equation with TikZ nodes. Note that we have to
% adjust the baseline of the nodes to get proper alignment with the rest of
% the equation

\begin{equation}
            \tikz[baseline]{
            \node[fill=blue!20,anchor=base] (t1)
            {$y^e(x)$};
        } 
        =
        \tikz[baseline]{
            \node[fill=red!20,anchor=base] (t2)
            {$y^m(x,\theta^*)$};
        } 
\end{equation}

\begin{itemize}
    \item Computer Model Response
        \tikz\node [fill=red!20,draw,circle] (n2) {};
\end{itemize}

% Now it's time to draw some edges between the global nodes. Note that we
% have to apply the 'overlay' style

\begin{tikzpicture}[overlay]
        \path[->] (n1) edge [bend left] (t1);
        \path[->] (n2) edge [bend right] (t2);
\end{tikzpicture}

\end{document}

相关内容