Take the 2-minute tour ×

I'm trying to draw two arrows between nodes as follows:

A ------> B

The arrows should be parallel, in opposite directions but not on top of each other. (I can bend the arrows but that's not what I'm after.)

What's the cleanest way to do this in TikZ? And can I have just one of the arrows "struck out" as in the example?

share|improve this question
For the "strike out", take a look at the answers to the question: tex.stackexchange.com/q/3161/86 –  Andrew Stacey May 12 '11 at 18:26
add comment

2 Answers

Here is an idea that might answer both your questions. It uses yshift to move the start and end points of the two paths up/down by 5pt. The result could be further improved by shifting the start/end points along the x axis in order for the paths to really be in contact with the nodes' circles.

A custom TikZ style is used to add a strike-through marking at the middle of the second path. This could be parameterized further to allow moving the marking to any position on the path etc.

I cannot tell whether this is the most elegant solution though.




  strike through/.style={
      mark=at position 0.5 with {
        \draw[-] (-5pt,-5pt) -- (5pt, 5pt);

  \node[draw,circle] (foo) at (0,0) { foo };
  \node[draw,circle] (bar) at (4,0) { bar };

  \draw[>=latex,->]                ([yshift= 5pt] foo.east) -- ([yshift= 5pt] bar.west);
  \draw[>=latex,<-,strike through] ([yshift=-5pt] foo.east) -- ([yshift=-5pt] bar.west);

Here is how it looks like:

Screenshot of the result

share|improve this answer
Note that you can apply simple shifts on coordinates by using the yshift, xshift or shift options on the coordinate: ([yshift=2pt]foo.east) instead of ($ (foo.east) + (0, 2pt) $). This is often not known. It does not require the calc library. –  Martin Scharrer May 12 '11 at 16:16
Interesting, I didn't know that syntax. I tried yshift in the arguments to \draw as well as after -- (also tried edge instead of --) but neither of them worked. Thanks for the hint. –  Jannis Pohlmann May 12 '11 at 16:21
@Jannis: If you operate on named coordinates instead of direct ones, you further need transform canvas. –  Andrey Vihrov May 12 '11 at 16:22
@Andrey: Ah, alright. –  Jannis Pohlmann May 12 '11 at 16:24
@Andrey: It seems to be an issue if you use the node name without an anchor, because then the border anchor is taken which depends on the position of the target coordinate. That's basically the difference between (A) and (A.center). It seems to work without transform canvas if you use an anchor like (A.west). –  Martin Scharrer May 12 '11 at 18:12
show 7 more comments

With PSTricks. Unfortunately, no option to change the radius of \circlenode to be uniform.

enter image description here

share|improve this answer
add comment

Your Answer


