6

I’m creating a diagram and there are several arrows which exit from the same node. The problem is that in many PDF viewers the arrows get slighly blurred at some zoom levels so that the lines appear thicker like this when they are drawn on top of each other:

Thick lines

\documentclass[10pt]{amsart}
\usepackage{tikz}
\usetikzlibrary{arrows}

\begin{document}

\begin{tikzpicture}[
  font=\sffamily,
  every matrix/.style={ampersand replacement=\&,column sep=1cm,row sep=0.5cm},
  data/.style={draw,thick,fill=yellow!20,inner sep=.3cm},
  to/.style={->,>=stealth',shorten >=1pt,semithick,font=\sffamily\footnotesize},
  every node/.style={align=center}]

  \matrix{
    \node[data] (a) {a};\\
    \node[data] (b) {b};\\
    \node[data] (c) {c};\\
  };


  \draw[to] (a.east) -- ++(0.5,0) |- (b.east);
  \draw[to] (a.east) -- ++(0.5,0) |- (c.east);
\end{tikzpicture}

\end{document}
  • Good question. I believe I have seen that somewhere but can't find it right now. One answer, of course, would be to start the next arrow at the lines crossing. But we will see if someone has an answer. For the beginning, please complete your MWE to make it compilable and test, if you see this effect on printed paper as well. Thanks. (PS: are the lines really black? 100 % opacity?) – LaRiFaRi Oct 26 '14 at 2:39
  • @LaRiFaRi: I’ve added a MWE. The lines are 100% black. I doubt it will be visible in print, but I can’t test it. – Lenar Hoyt Oct 26 '14 at 2:51
6

Define an intermediate coordinate aa and then use orthogonal coordinates - b.east -|aa

\documentclass[tikz,border=5]{standalone}
\usetikzlibrary{positioning}
\begin{document}
  \begin{tikzpicture}
    \node[draw] (a) at (0,0) {Some};
    \node[draw,below=1cm of a] (b)  {Some one};
    \node[draw,below=1cm of b] (c)  {Some two};
    \node[draw,below=1cm of c] (d)  {Some three};
    \draw[->] (a.east) -- ++(1,0pt)coordinate (aa) |- (d.east);
    \draw[<-] (b.east) -- (b.east -|aa);
    \draw[<-] (c.east) --  (c.east -| aa);
  \end{tikzpicture}
\end{document}

enter image description here

Fir your code do this:

\draw[to] (a.east) -- ++(0.5,0) coordinate (aa) |- (c.east);
\draw[to] (b.east -| aa) --  (b.east);

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.