使用 TikZ 包帮助 LateX Diagram

使用 TikZ 包帮助 LateX Diagram

我是 Latex 的新手,我想知道您是否能帮我绘制这张图。提前谢谢您!

在此处输入图片描述

答案1

简短的提议和一些评论。现在是时候阅读了这个问题

\documentclass[tikz]{standalone}
\usetikzlibrary{shapes,positioning}
\begin{document}
\begin{tikzpicture}[>=stealth]
\sffamily
% The main nodes
\node[minimum height=1.5cm,minimum width=2cm,text centered,draw] (a) {Traning};
\node[minimum height=1.5cm,minimum width=2cm,text centered,draw,right=2cm of a] (b) {Prediction};
% The arrow in the middle
\draw[->] (a)--(b) node[midway,above,align=center,font=\footnotesize] (mid) {Model\\Parameter};
% The ellipse node at the bottom needs `shapes' library
\node[below=1.5cm of mid,ellipse,draw] (mod) {Model};
\draw[->] (mod) -| (a); % Read https://tex.stackexchange.com/q/481195/156344
\draw[->] (mod) -| (b); %
% The outside arrows: take care of the direction of the arrow
% Read more in https://tex.stackexchange.com/q/66094/156344
\draw[<-] (a.west) -- ++ (-1,0) node[left,align=center,font=\footnotesize] {Ground\\Truth};
\draw[->] (b.east) -- ++ (1,0) node[right,font=\footnotesize] {Prediction};
\draw[<-] (a.north) -- ++ (0,1) node[above] {Observation};
\draw[<-] (b.north) -- ++ (0,1) node[above] {Observation};
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容