我有以下代码:
\begin{tikzpicture}[baseline={(current bounding box.center)},node distance=1.5cm]
% We start by placing the blocks
\node [input, name=input,label=below:$\xi_{k}$] {};
\node [sum, left of=input] (sum) {};
\node [block, left of=sum, node distance=3cm] (Ck) {$C_k$};
\node [left of=sum, node distance=2cm,label=below:$y_{k+1}$] (div) {};
\node [block,above right=0.5cm and 0.1cm of div] (zm1) {$z^{-1}$};
\node [block,above right=0.5cm and 1cm of div] (Ak) {$A_k$};
\node [output,left of=Ck,label=below:$w_k$,node distance=0.6cm] (output) {};
\draw [draw,->] (input) -- (sum);
\draw [draw,->] (sum) -- (Ck);
\draw [->] (zm1) -- (Ak);
\draw [draw,->] (Ak) -| node[pos=0.97,right] {+} (sum);
\fill (div) circle [radius=1.5pt];
\draw [->] (div) |- (zm1);
\draw [draw,->] (Ck) -- (output);
\end{tikzpicture}
输出:
由于某种原因,从黑色圆圈连接处发出的箭头没有接触圆圈(见上文红色部分)。我该如何解决这个问题?非常感谢!
答案1
我建议按如下方式重写您的代码:
\begin{tikzpicture}[
node distance = 9mm,
sum/.style = {circle,draw, fill=blue!20, minimum size=1ex,
node contents={}},
block/.style = {draw, fill=blue!20, rectangle, minimum size=3ex}
]
\coordinate[label=below:$\xi_{k}$] (input);
\node (sum) [sum,left=of input];
\coordinate[left=22mm of sum,label=below:$y_{k+1}$] (div);
\node (Ck) [block,left=of div] {$C_k$};
\coordinate[left=of Ck,label=below:$w_k$] (output);
%
\node (zm1) [block,above right=5mm and 3mm of div] {$z^{-1}$};
\node (Ak) [block,right=3mm of zm1] {$A_k$};
%
\path[draw,->] (input) edge (sum) (sum) edge (Ck)
(Ck) edge (output) (zm1) -- (Ak);
\draw[->] (div) |- (zm1);
\draw[->] (Ak) -| (sum) node[above right] {+};
\fill[black] (div) circle (1.5pt);
\end{tikzpicture}
在其中input
, 我使用div
和代替节点。这样,我消除了所有定义的节点。如你所见,我还重新组织了你的代码。在这个定位中,我使用了正确的符号,例如(而不是过时的)。output
\coordinate
sep
left=of div
left of=div
答案2
该div
节点没有数据,但节点有 paddig,因此
- 将 添加
inner sep=0pt,outer sep=0pt
到 的定义中div
,或者 - 绘制
div.center
而不是仅仅div