如何让箭头指向同一位置?

如何让箭头指向同一位置?

我在网上找到了一个模型图并对其进行了修改,所以现在的代码是:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows}

\tikzstyle{io} = [
  ellipse,
  minimum width=3cm,
  minimum height=1cm,
  text centered,
  draw=black,
  fill=blue!30]
\tikzstyle{arrow} = [thick,->,>=stealth]

\begin{document}
\begin{tikzpicture}[node distance=2cm]
  \node (1) [io] at (90:2in) {K. $\mu$~-~p.k.};
  \node (2) [io] at (135:2in) {K. $\mu$~-~ të mesmen};
  \node (3) [io] at (180:2in) {K. uniforme};
  \node (4) [io] at (360:2in) {K. $\mu$~-~p.u.};
  \node (5) [io] at (45:2in) {K. sipas masës};

  \draw [arrow] (3) -- (1);
  \draw [arrow] (4) -- (1);
  \draw [arrow] (3) -- (5);
  \draw [arrow] (3) -- (4);
  \draw [arrow] (2) -- (5);
  \draw [arrow] (4) -- (5);
\end{tikzpicture}
\end{document}

在此处输入图片描述

如何使箭头在节点的同一点相交?

答案1

您可以使用如下锚点:

\documentclass{article}

\usepackage{tikz} \usetikzlibrary{shapes.geometric, arrows}

\tikzstyle{io} = [ellipse, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=blue!30] \tikzstyle{arrow} = [thick,->,>=stealth]

\begin{document}
\begin{tikzpicture}[node distance=2cm]
  \node (1) [io] at (90:2in) {K. $\mu$~-~p.k.};
  \node (2) [io] at (135:2in) {K. $\mu$~-~ të mesmen};
  \node (3) [io] at (180:2in) {K. uniforme};
  \node (4) [io] at (360:2in) {K. $\mu$~-~p.u.};
  \node (5) [io] at (45:2in) {K. sipas masës};

  \draw [arrow] (3) -- (1.south);
  \draw [arrow] (4) -- (1.south); 
  \draw [arrow] (3) -- (5.south west);
  \draw [arrow] (3) -- (4);
  \draw [arrow] (2) -- (5.south west);
  \draw [arrow] (4) -- (5.south west);


\end{tikzpicture} \end{document}

答案2

\documentclass{article}
\usepackage{tikz} \usetikzlibrary{shapes.geometric, arrows}

\tikzstyle{io} = [ellipse, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=blue!30] \tikzstyle{arrow} = [thick,->,>=stealth]

\begin{document}

\begin{tikzpicture}%[node distance=2cm] 
\node (1) [io] at (90: 2in) {K. $\mu$~-~p.k.}; 
\node (2) [io] at (135:2in) {K. $\mu$~-~ të mesmen}; 
\node (3) [io] at (180:2in) {K. uniforme}; 
\node (4) [io] at (360:2in) {K. $\mu$~-~p.u.}; 
\node (5) [io] at (45: 2in) {K. sipas masës};

\draw [arrow] (3) -- (1.south); 
\draw [arrow] (4) -- (1.south); 
\draw [arrow] (3) -- (5.south); 
\draw [arrow] (3) -- (4); 
\draw [arrow] (2) -- (5); 
\draw [arrow] (4) -- (5.south);
\end{tikzpicture} 

\end{document}

在此处输入图片描述

相关内容