我正在尝试制作类似于下图所示的内容,但我被困在箭头上的文字中,我无法制作那些阴影,非常感谢!
\documentclass{book}
\usepackage[table,xcdraw,dvipsnames,svgnames,x11names]{xcolor}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric,arrows.meta,positioning}
\tikzset{%
mytext/.style={font=\ttfamily\slshape\scriptsize,color=black}
,process/.style={mytext,
,rectangle
,minimum width=2cm,minimum height=1cm
,text width=2.5cm
,text centered
,draw
}
,decision/.style={mytext,
,diamond
,text width=1cm
,minimum height=0.9cm
,text centered
,draw
,fill=blue!10
}
,arrow/.style={%
,very thick
,-Latex[round]
}
,line/.style={%
,draw
,-latex'
}
}
\begin{document}
\begin{tikzpicture}
\node [decision,fill=cyan,draw=cyan] (dec1){Meet \\Goals?};
\node [process,fill=Gold,draw=Gold, above =2.6cm of dec1] (pro1) {Analyze/\\Re-analysis};
\node [process, left = of pro1,fill=DeepSkyBlue,draw=DeepSkyBlue] (pro2){Design\\ Experiment};
\node [process, below = of pro2,fill=Chartreuse2,draw=Chartreuse2] (pro3){Design\\ Experiment};
\node (pro4) [process, below = of pro3,fill=DarkOrchid2,draw=DarkOrchid2] {Charcterization\\ of Materials};
\node (pro5) [process, right =1.4cm of dec1,left color=Tomato,right color=Orange,draw=DarkOrange2] {Optimization\\design and scale up};
\node (proo) [text width=2.5cm,align = center ,mytext,right = of pro1]{\textbf{Traditional \\materials design\\process}}
\draw [arrow] (dec1) -- (pro1);
\draw [arrow] (pro1) -- (pro2);
\draw [arrow] (pro2) -- (pro3);
\draw [arrow] (pro3) -- (pro4);
\draw [arrow] (pro4) -- (dec1);
\draw [arrow] (dec1) -- (pro5);
\end{tikzpicture}
\end{document}
答案1
像这样
平均能量损失
\documentclass{book}
\usepackage[table,xcdraw,dvipsnames,svgnames,x11names]{xcolor}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric,arrows.meta,positioning, shadows}
\tikzset{%
mytext/.style={font=\ttfamily\slshape\scriptsize,color=black}
,process/.style={mytext,
,rectangle
,minimum width=2cm,minimum height=1cm
,text width=2.5cm
,text centered
,draw, drop shadow={shadow xshift=-4pt, shadow yshift=-4pt}
}
,decision/.style={mytext,
,diamond
,text width=1cm
,minimum height=0.9cm
,text centered
,draw
,fill=blue!10, drop shadow={shadow xshift=0em, shadow yshift=-6pt}
}
,arrow/.style={%
,very thick
,-Latex[round]
}
,line/.style={%
,draw
,-latex'
}
}
\begin{document}
\begin{tikzpicture}
\node [decision,fill=cyan,draw=cyan] (dec1){Meet \\Goals?};
\node [process,fill=Gold,draw=Gold, above =2.6cm of dec1] (pro1) {Analyze/\\Re-analysis};
\node [process, left = of pro1,fill=DeepSkyBlue,draw=DeepSkyBlue] (pro2){Design\\ Experiment};
\node [process, below = of pro2,fill=Chartreuse2,draw=Chartreuse2] (pro3){Design\\ Experiment};
\node (pro4) [process, below = of pro3,fill=DarkOrchid2,draw=DarkOrchid2] {Charcterization\\ of Materials};
\node (pro5) [process, right =1.4cm of dec1,left color=Tomato,right color=Orange,draw=DarkOrange2] {Optimization\\design and scale up};
\node (proo) [text width=2.5cm,align = center ,mytext,right = of pro1]{\textbf{Traditional \\materials design\\process}};
\draw [arrow] (dec1) -- node[right, pos=0.4]{\textbf {No}}(pro1);
\draw [arrow] (pro1) -- (pro2);
\draw [arrow] (pro2) -- (pro3);
\draw [arrow] (pro3) -- (pro4);
\draw [arrow] (pro4) -- (dec1);
\draw [arrow] (dec1) -- node[above, pos=0.4]{\textbf {Yes}}(pro5);
\end{tikzpicture}
\end{document}
**编辑 **
您还可以更改阴影的颜色
drop shadow={shadow xshift=0em,
shadow yshift=-6pt,
top color=red,
bottom color=black,}
和输出