![tikz에서 좌표를 사용하는 방법은 무엇입니까?](https://rvso.com/image/254694/tikz%EC%97%90%EC%84%9C%20%EC%A2%8C%ED%91%9C%EB%A5%BC%20%EC%82%AC%EC%9A%A9%ED%95%98%EB%8A%94%20%EB%B0%A9%EB%B2%95%EC%9D%80%20%EB%AC%B4%EC%97%87%EC%9E%85%EB%8B%88%EA%B9%8C%3F.png)
다음은 내 코드입니다.
\begin{tikzpicture}[node distance=5cm,auto,>=latex', scale = 0.75, transform shape]
\coordinate (a1) [] {};
\node (rect) (a) [draw,minimum width=3cm,minimum height=1cm, below of=a1,node distance=1cm] {Sender};
\node[rectangle] (b) [draw,minimum width=3cm,minimum height=1cm, below of=a,node distance=2cm] {Receiver};
\coordinate (b1) [below=2cm of b] {};
\path[->] (a) edge node { $f$ } (b);
\path[->] (a1) edge node { $f$ } (a);
\path[->] (b) edge node { $f$ } (b1);
\end{tikzpicture}
다음과 같은 결과가 나타납니다.
수신기에서 b1까지 하나의 화살표를 원합니다.
누구든지 내 실수를 말해 줄 수 있습니까?
답변1
coordinate
당신은 나쁜 방식으로 정의하고 있습니다 . 다음을 수행해야 합니다.
\coordinate [below=2cm of b] (b1) {};
이렇게 하면 귀하의 코드가 저에게 효과적입니다.
따라서 전체 코드는 다음과 같아야 합니다.
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning,arrows}
\begin{document}
\begin{tikzpicture}[node distance=5cm,auto,>=latex', scale = 0.75, transform shape]
\coordinate (a1) {};
\node (rect) (a) [draw,minimum width=3cm,minimum height=1cm, below of=a1,node distance=1cm] {Sender};
\node[rectangle] (b) [draw,minimum width=3cm,minimum height=1cm, below of=a,node distance=2cm] {Receiver};
\coordinate[below=2cm of b] (b1) {};
\path[->] (a) edge node { $f$ } (b);
\path[->] (a1) edge node { $f$ } (a);
\path[->] (b) edge node { $f$ } (b1);
\end{tikzpicture}
\end{document}
결과는 다음과 같습니다.