在 TikZ 中绘制流程图,绝对的初学者

在 TikZ 中绘制流程图,绝对的初学者

我想创建一个类似于此的图表:

enter image description here

其原始来源是这里

我是 LaTeX 的新手,不幸的是,我对此没有经验,所以我正在寻求任何形式的帮助。

万分感谢

答案1

无需tikz添加库或样式

\documentclass{article}
\usepackage{tikz}

\begin{document}

\centering
\begin{tikzpicture}[>=stealth,thick]
% add circulare nodes
\node[draw,circle,minimum size=8mm](first){$+$};
\node[draw,circle,minimum size=8mm](second) at (3,-1){$\star$};

% add arrows 
\draw[->](-3,.8)   coordinate(A)--+(1,0)--(first.177);
\draw[->](-3,-.8)  coordinate(B)--+(1,0)--(first.183);
\draw[->](-3,-2.4) coordinate(C)--+(1,0)--(second.183);
\draw[->](first.east)--+(1,0)--(second.177);
\draw    (second.east)--+(1,0);

\draw[->](first.east)--+(.5,0)coordinate(D);
\draw[->](second.east)--+(.5,0)coordinate(E);

% add labels
\node [anchor=south east]    at(A){x};
\node [anchor=south west]    at(A){-2};
\node [anchor=north west,red]at(A){-4};

\node [anchor=south east]    at(B){y};
\node [anchor=south west]    at(B){5};
\node [anchor=north west,red]at(B){-4};

\node [anchor=south east]    at(C){z};
\node [anchor=south west]    at(C){-4};
\node [anchor=north west,red]at(C){3};

\node [anchor=south east]    at(D){q};
\node [anchor=south west]    at(D){3};
\node [anchor=north west,red]at(D){-4};

\node [anchor=south east]    at(E){f};
\node [anchor=south west]    at(E){-12};
\node [anchor=north west,red]at(E){1};
\end{tikzpicture}

\end{document} 

enter image description here

相关内容