节点的角有节点后缀吗?
我希望此示例中的括号从第一个框的左下角延伸到最后一个框的右下角。
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes,patterns,decorations.pathreplacing}
\begin{document}
\tikzstyle{frame} = [rectangle, draw, fill=blue!20,
text width=4em, text centered, minimum height=3em, node distance=3cm]
\begin{tikzpicture}
\node [frame] (f1) {$f_1$};
\node [frame, right of=f1] (f2) {$f_2$};
\node [frame, right of=f2] (f3) {$f_3$};
\draw [decoration={brace,mirror},decorate] (f1.center) -- (f3.center);
\end{tikzpicture}
\end{document}
答案1
使用south east
和south west
锚点(详情见第 308 页蒂克兹手动的):
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes,patterns,decorations.pathreplacing}
\begin{document}
\tikzstyle{frame} = [rectangle, draw, fill=blue!20,
text width=4em, text centered, minimum height=3em, node distance=3cm]
\begin{tikzpicture}
\node [frame] (f1) {$f_1$};
\node [frame, right of=f1] (f2) {$f_2$};
\node [frame, right of=f2] (f3) {$f_3$};
\draw [decoration={brace,mirror},decorate] (f1.south west) -- (f3.south east);
\end{tikzpicture}
\end{document}
结果: