我有以下 tikz 图。如何在左侧(2 厘米远)绘制括号Node1
?
\begin{frame}
\begin{figure}[!htbp]
\centering
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=2cm,
,main node/.style={,fill=white!20,draw,font=\sffamily\small\bfseries}]
\node[main node,scale=0.8] (Node1) {Node 1};
\node[main node,scale=0.8] (Node2) [right=0.8cm of
Node1] {Node 2};
\node[main node,scale=0.8] (Node3) [below=1.5cm of Node1] {Node 3};
\path[every node/.style={font=\sffamily\small}]
(Node1) edge node {} (Node3)
(Node2) edge node {} (Node3)
;
\end{tikzpicture}
\end{figure}
\end{frame}
答案1
像这样?
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{arrows, positioning, decorations.pathreplacing}
\begin{document}
\begin{frame}
\begin{figure}[!htbp]
\centering
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=2cm,
,main node/.style={,fill=white!20,draw,font=\sffamily\small\bfseries}]
\node[main node,scale=0.8] (Node1) {Node 1};
\node[main node,scale=0.8] (Node2) [right=0.8cm of
Node1] {Node 2};
\node[main node,scale=0.8] (Node3) [below=1.5cm of Node1] {Node 3};
\path[every node/.style={font=\sffamily\small}]
(Node1) edge node {} (Node3)
(Node2) edge node {} (Node3)
;
\draw[-,decorate, decoration={brace, raise=2cm}] (Node3.south west)--(Node1.north west);
\end{tikzpicture}
\end{figure}
\end{frame}
\end{document}