并排放置两个流程图

并排放置两个流程图

我读过一些关于将无花果并排放置的其他帖子,我不认为这是重复的,因为流程图不是图形。本质上,我在标题中说了我的目标,我想在文档中并排放置两个流程图。流程图示例...

\tikzstyle{block} = [rectangle, draw, fill=blue!20, 
    text width=5em, text centered, rounded corners, minimum height=4em]
\tikzstyle{line} = [draw, -latex']
\tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,
    minimum height=2em]

\begin{tikzpicture}[node distance = 2cm, auto]
    % Place nodes
    \node [block] (init) {create design matrix};
    \node [block, below of=init] (identify) {fit a linear model};
    \node [cloud, left of=identify] (expert) {eBayes};
    \node [block, below of=identify] (evaluate) {make contrasts matrix};
    \node [block, below of=evaluate, node distance=3cm] (decide) {apply Bayesian smoothing to standard errors};
    \node [block, below of=decide, node distance=3cm] (stop) {output: moderated t-stat};
    % Draw edges
    \path [line] (init) -- (identify);
    \path [line] (identify) -- (evaluate);
    \path [line] (evaluate) -- (decide);
    \path [line] (decide) -- (stop);
    \path [line,dashed] (expert) -- (identify);
\end{tikzpicture}

本质上,我希望此流程图位于另一个类似流程图的左侧。有人知道完成此任务的方法吗?

答案1

只需将第二个tikzpicture环境放在第一个环境之后,它们之间不需要空行

\documentclass{article}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric,arrows}

\begin{document}



\tikzstyle{block} = [rectangle, draw, fill=blue!20, 
    text width=5em, text centered, rounded corners, minimum height=4em]
\tikzstyle{line} = [draw, -latex']
\tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,
    minimum height=2em]

\begin{tikzpicture}[node distance = 2cm, auto]
    % Place nodes
    \node [block] (init) {create design matrix};
    \node [block, below of=init] (identify) {fit a linear model};
    \node [cloud, left of=identify] (expert) {eBayes};
    \node [block, below of=identify] (evaluate) {make contrasts matrix};
    \node [block, below of=evaluate, node distance=3cm] (decide) {apply Bayesian smoothing to standard errors};
    \node [block, below of=decide, node distance=3cm] (stop) {output: moderated t-stat};
    % Draw edges
    \path [line] (init) -- (identify);
    \path [line] (identify) -- (evaluate);
    \path [line] (evaluate) -- (decide);
    \path [line] (decide) -- (stop);
    \path [line,dashed] (expert) -- (identify);
\end{tikzpicture}
\begin{tikzpicture}[node distance = 2cm, auto]
    % Place nodes
    \node [block] (init) {create design matrix};
    \node [block, below of=init] (identify) {fit a linear model};
    \node [cloud, left of=identify] (expert) {eBayes};
    \node [block, below of=identify] (evaluate) {make contrasts matrix};
    \node [block, below of=evaluate, node distance=3cm] (decide) {apply Bayesian smoothing to standard errors};
    \node [block, below of=decide, node distance=3cm] (stop) {output: moderated t-stat};
    % Draw edges
    \path [line] (init) -- (identify);
    \path [line] (identify) -- (evaluate);
    \path [line] (evaluate) -- (decide);
    \path [line] (decide) -- (stop);
    \path [line,dashed] (expert) -- (identify);
\end{tikzpicture}


\end{document} 

相关内容