Referencing this very helpful posts and the Tikz manual, which states:
Whenever TikZ encounters a whole node name as a “coordinate,” it tries to “be smart” about the anchor that it should choose for this node. Depending on what happens next, TikZ will choose an anchor that lies on the border of the node on a line to the next coordinate or control point.
I can see the difference in the way the following two paths are drawn:
The second path is the preferred one. My question is if there is a better way to integrate this into fewer commands. I cannot seem to get a "point" drawn using the shape=coordinate
inside node[]
, and instead am drawing the actual points using filldraw.
\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,backgrounds,patterns,shapes.geometric,calc,positioning}
\begin{document}
\begin{tikzpicture}[scale=1,auto]
[bend angle=45]
\node[name=f,shape=ellipse,draw, thick, minimum width=50, minimum height=75] at (0,0) {};
\node[name=g,shape=ellipse,draw, thick, minimum width=50, minimum height=75] at (2,0) {};
\coordinate(f1) at ($(f.center) + (0,1)$);
\coordinate(g1) at ($(g.center) + (0,1)$);
\node at ($(f.center) + (0,-1)$) (f3) {};
\node at ($(g.center) + (0,-1)$) (g3) {};
\filldraw
(f1) circle (1pt)
(f3) circle (1pt)
(g1) circle (1pt)
(g3) circle (1pt);
\draw[->, >=stealth,bend left] (f1) to (g1);
\draw[->, >=stealth,bend left] (f3) to (g3);
\end{tikzpicture}
\end{document}
Best Answer
If you daw the nodes you made you will understand that in one case you connect points in the other one you connect "boxes" aka nodes :