\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric,arrows,backgrounds,fit,matrix}
\tikzset{
basics/.style={minimum width=30mm, minimum height=7.5mm, text centered, draw=black},
startstop/.style={rectangle, rounded corners, basics, fill=red!30},
io/.style={trapezium, trapezium left angle=70, trapezium right angle=110, basics, fill=pink!30},
process/.style={rectangle, basics, fill=blue!30},
decision/.style={ellipse,basics, fill=yellow!30},
arrow/.style={thick,->,>=stealth},
}
\begin{document}
\pgfdeclarelayer{background layer}
\pgfsetlayers{background layer,main}
\begin{frame}{Methodology}
\begin{tikzpicture}[node distance = 17mm, auto]
\node (Sta) [startstop] {Problem Identification};
\node (Lit) [process, below of=Sta] {Literature Review};
\draw[arrow] (Sta) -- (Lit);
\node (Mat) [process, below of=Lit, text width = 5cm] {Materials\\ VG10, VG30, VG40, PMB(P), PMB(E), \& CRMB};
\node (Agi) [process, below of=Mat, text width = 5cm] {Aging\\ \begin{itemize}
\item Unaged
\item Short-term aged
\item Long-term aged
\end{itemize}};
\draw[arrow] (Mat) -- (Agi);
\begin{pgfonlayer}{background layer}
\node (MatAgi) [draw,fill=green!50,fit= (Mat) (Agi)]{};
\end{pgfonlayer}
\draw[arrow] (Lit) -- (MatAgi);
\node (Ana) [io, below of=Agi, text width = 4cm] {Analysis of parameters\\ by linear \& non-\\ linear model };
\hspace{3cm} \node (Gra) [decision, right of=Ana, text width = 2.5cm] {Binder grading\\ methodology};
\draw[arrow] (Gra) -- (Ana);
\node (Con) [startstop,, below of=Gra] {Conclusions};
\draw[arrow] (Gra) -- (Con);
\hspace{2cm} \node (Pro) [process, right of=Mat, text width = 4cm] {Basic properties\\ of bitumen};
\node (Cha) [process, right of=Agi, text width = 4cm] {Characterization at\\ various temperatures\\ (0 to 70 \textsuperscript{o}C)};
\draw[arrow] (Pro) -- (Cha);
\begin{pgfonlayer}{background layer}
\hspace{5cm} \node (ProCha) [draw,fill=green!50,fit= (Pro) (Cha)]{};
\draw[arrow] (ProCha) -- (MatAgi);
\draw[arrow] (ProCha) -- (Ana);
\end{pgfonlayer}
\end{tikzpicture}
\end{frame}
\end{document}
答案1
渴望评论...
- 欢迎来到 TeX.SE!
- 坦白说,你的代码很奇怪。这是你的问题吗?
- 从您的代码中不可能看出您的流程图应该是什么样子。
- 只是猜测,那个流程图应该是这样的,但是,不清楚,节点是如何连接的......
\documentclass{beamer}
\usepackage{siunitx}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
backgrounds,
chains,
fit,
matrix,
shapes.geometric}
\tikzset{
node distance = 4mm and 22mm,
start chain = going below,
%
base/.style = {draw,
text width=32mm, align=center},
io/.style = {base,
trapezium, trapezium stretches body,
trapezium left angle=70, trapezium right angle=110,
fill=pink!30},
decision/.style = {diamond, aspect=2,
draw, fill=green!30,
align=center, inner xsep=0pt},
% = {ellipse,basics, fill=yellow!30}, ?
FIT/.style = {draw, fill=green!50, fit=#1},
process/.style = {base, fill=blue!30}, % <---
startstop/.style = {base, rounded corners, fill=red!30}, % <---
%
arr/.style = {thick,-Stealth},
}
\begin{document}
\begin{frame}
\frametitle{Methodology}
\centering
\begin{tikzpicture}[font=\tiny]
\begin{scope}[nodes={on chain, join=by arr}]
\node (Sta) [startstop] {Problem Identification};
\node (Lit) [process] {Literature Review};
\node (Mat) [process] {Materials\\ VG10, VG30, VG40, PMB(P), PMB(E), \& CRMB};
\node (Agi) [process] {Aging\\
\begin{itemize}
\item Unaged
\item Short-term aged
\item Long-term aged
\end{itemize}};
% \draw[arr] (Lit) -- (MatAgi);
\node (Ana) [io] {Analysis of parameters by linear \& non-linear model};
\node (Gra) [decision] {Binder grading\\ methodology};
\node (Con) [startstop] {Conclusions};
\end{scope}
\node (Pro) [process, right=of Mat] {Basic properties\\ of bitumen};
\node (Cha) [process, right=of Agi] {Characterization at various temperatures
(\qtyrange{0}{70}{\celsius})
};
\draw[arr] (Pro) -- (Cha);
\scoped[on background layer]
{
\node (MatAgi) [FIT=(Mat) (Agi)] {};
\node (ProCha) [FIT=(Pro) (Cha)] {};
}
\end{tikzpicture}
\end{frame}
\end{document}