In a simple drawing like this (I use automata
library):
\begin{tikzpicture}[shorten >=1pt,node
distance=2cm,auto,initial text=]
\tikzstyle{every state}=[draw=blue!50,very thick,fill=blue!20]
\node[state] (a) {};
\node[coordinate] (b) [right of=a] {};
\node[state] (c) [right of=b] {};
\draw[-] (a) edge node {a} (b);
\draw[->] (b) edge (c);
\end{tikzpicture}
I get a tip in node b
even though I do not specify it there. I create an additional node (here: b
) to have a segmented line, and I don't want any tips there. How can I get rid of that tip? Interestingly, if I put a star at the end of -
as an option for \draw
, I get both a filled circle and an arrow tip at b
, but if I keep -
option, and prepend a star to ->
, I get two filled circles at b
.
I don't know how to mark a comment as a good answer, but the right (and the simplest) answer was among comments. I replaced \draw[-] (a) edge
with \path (a) edge[-]
and draw[->] (b) edge
with \path (b) edge[->]
. I also had to remove the global option shorten >=1pt
which gave me still small gaps in lines. What I wanted to achieve was several lines going horizontally, and then converging at various angles (with an arrow tip at the end) at a single state. Thanks for all the comments and answers.
`
to mark your inline code as I did in my edit.\draw (a) edge[->] node {a} (b);
if that's your intention\path[->, <and other options for everything including edges>] (a) edge[<local edge options>] node {a} (b);
See Strange arrow mark with TikZ edge and anchors. — Reading the question better, the arrow comes from the last path. Up should just use\path[->] (b) edge (c);
, (or\path
with everyedge
really).(b)
comes from\draw[->] (b) …;
which although only including a move-to operator, draws the arrow there. General rule: Use only\path
withedge
s. See Strange arrow mark with TikZ edge and anchors. Also related: Does a zero-length line with an arrow make sense? Is it a bug?\draw
if required.