I have a problem with arrow tips. I want to draw an arrow like the horizontal one in this image (this is just a MWE):
The position of the arrow tips is correct (the circle on the left must be over the NO-SO vertical line, and the tip on the right must end a few pt before the NE-SE vertical line). The problem is that if I use shorten
the wawy line is a mess. How can I fix it?
\documentclass[]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{decorations.pathmorphing}
\begin{document}
\begin{tikzpicture}
\node (NO) at (-2,+1.5) {NO};
\node (SO) at (-2,-1.5) {SO};
\node (NE) at (+2,+1.5) {NE};
\node (SE) at (+2,-1.5) {SE};
\draw [<->] (NO) -- node[coordinate] (O){} (SO);
\draw [<->] (NE) -- node[coordinate] (E){} (SE);
\draw [
{Circle[width=8pt, length=8pt, open]}-{Triangle[scale=1.5]},
decorate, decoration=snake, thick, shorten <=-4pt, shorten >= 4pt
] (O) -- (E);
\end{tikzpicture}
\end{document}
Bonus question: is there any way to shift horizontally the E and O nodes when they are defined as in my code, without defining auxiliary nodes?
Thank you!
coordinate[right=10pt] (O)
to moveO
10pt to the right.node
or does it replacenode
?coordinate
is short fornode[coordinate]
, socoordinate[...] (O)
replacesnode[coordinate, ...] (O){}
.