2

I have the following graph:

enter image description here

as result of the code command below (I left it that way as it is probably easier for your to use).

I would like to resolve the clutter below node B by bending the A->C arrow stronger down. How?

I also think that B->A should really be distinguishable from the C->A arrow. Suggestions in this direction are very welcome. I obviously only have the basic working knowledge about this package.

\newcommand{\Graph}{
        \begin{filecontents*}{pagerank1.tikz}
        \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm,
            thick,main node/.style={circle,fill=black,draw=none,text=white,font=\large\bfseries}]

            %nodes
            \node[main node] (A) {A};
            \node[main node] (B) [right of=A] {B};
            \node[main node] (C) [right of=B] {C};

            %lines
            \path[every node/.style={font=\sffamily\small}]
                (A) edge [loop left] node [left] {\sfrac{1}{6}} (A)
                    edge [right] node [above] {\sfrac{2}{3}} (B)
                    edge [bend left] node [above] {\sfrac{1}{6}} (C)
                (B) edge [bend left] node [above]{\sfrac{5}{12}} (A)
                    edge [loop below] node [right] {\sfrac{1}{6}} (B)
                    edge [right] node [above] {\sfrac{5}{12}} (C)
                (C) edge [bend left] node [below] {\sfrac{1}{6}} (A)
                    edge [bend left] node [above] {\sfrac{2}{3}} (B)
                    edge [loop right] node [right] {\sfrac{1}{6}} (C);
        \end{tikzpicture}
        \end{filecontents*}
}
3
  • bend right=50 or other values. You will have to make your code compilable in order to get that fixed from us. Thanks.
    – LaRiFaRi
    Jun 16, 2015 at 12:20
  • Great, can you put that as a solution, so i can accept it? It worked... i have to spend more time with this package...
    – RalfB
    Jun 16, 2015 at 12:22
  • 1
    You could also try laying the nodes out in a triangle, then the original problem would disappear...
    – Thruston
    Jun 16, 2015 at 13:12

1 Answer 1

2

You can set the bending ratio by defining bend right=50 or bend left=1cm or alike. Just try which value fits for you. This will also move the arrow head to some distinct position. Alternatively, you might use the options in=<some-angle>, out=<some-angle> in order to get your arrow to where you want it to be.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .