我怎样才能将指向总和的两个箭头从 X1 和 X2 中分离出来?

我怎样才能将指向总和的两个箭头从 X1 和 X2 中分离出来?
\begin{document}
% Definition of blocks:
\tikzset{
  input/.style    = {coordinate}, % Input
  output/.style   = {coordinate} % Output
}
\tikzstyle{sum} = [draw,circle,inner sep=.4mm,minimum size=2mm]
% Defining string as labels of certain blocks.
\newcommand{\suma}{\tiny $+$};
\begin{tikzpicture}[auto, very thin, node distance=1cm, >=latex]
\draw[->] (-1,.5) node[left] {\tiny $X_1$} -- (0,0) node[sum, right] (sum1) {\suma};
\draw[->] (-1,-.5) node[left] {\tiny $X_2$} -- (0,0);
\draw[->] (.35,0) -- (1.2,0) node [right] {\tiny $Y$};
\draw[->] (0.17,.7) node [above] {\tiny $N$} -- (0.17,.18);
\end{tikzpicture}
\end{document}

在此处输入图片描述

答案1

在此处输入图片描述

首先确定节点的位置,然后在它们之间画边:

\documentclass[border=3.141592]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
                positioning}

\usepackage{lipsum}

\begin{document}
    \begin{tikzpicture}[
            > = Stealth,
node distance = 5mm and 10mm, 
   sum/.style = {circle, draw, label=center:$+$},
     N/.style = {font=\tiny},
every edge/.append style = {draw, ->}
                ]
% nodes positions
\coordinate[label=left:$X_1$] (in1);
\node (sum) [sum, below right=of in1] {};
\coordinate[below left=of sum,
            label=left:$X_2$] (in2);
\node (out) [N, right=of sum] {$Y$};
% edges between nodes
\draw   (in1) edge (sum)
        (in2) edge (sum)
        (sum) ++ (0,1) node[above] {$N$} edge (sum) 
        (sum) edge (out); 
\end{tikzpicture}
\end{document}

答案2

您可以开始绘制中心节点,然后从该节点绘制末端带有节点的箭头。

\documentclass[tikz, border=2mm]{standalone}

% Definition of blocks:
\tikzset{
  input/.style    = {coordinate}, % Input
  output/.style   = {coordinate}, % Output
  suma/.style   = {draw, circle, inner sep=.4mm, minimum size=2mm}
}

\begin{document}
\begin{tikzpicture}[auto, very thin, node distance=1cm, >=latex, font=\tiny]
\node[suma] (sum1) {$+$};
\draw[->] (sum1) --++(0:1.5cm) node[right]{$Y$};
\draw[<-] (sum1) --++(90:1cm) node[above]{$N$};
\draw[<-] (sum1) --++(150:1.5cm) node[above left]{$X_1$};
\draw[<-] (sum1) --++(210:1.5cm) node[below left]{$X_2$};
\end{tikzpicture}
\end{document}

在此处输入图片描述

答案3

如果目的只是为了分开箭

编辑以下代码为

    \draw[->] (-1,-.5) node[left] {\tiny $X_2$} -- (sum1.south west);

在此处输入图片描述

相关内容