5

I tried setting edge from parent/.style={draw, bend left=60}, but the line remains straight. What am I doing wrong?

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[
        every node/.style={
                draw,
                circle,
        },
        edge from parent/.style={
                draw,
                bend left=25,
        },
]
\node {}
        child {node {}}
        child {node {}};
\end{tikzpicture}
\end{document}
4
  • 1
    Could you provide a mwe? Commented Aug 23, 2012 at 9:54
  • @Claudio Added it now.
    – Vegard
    Commented Aug 23, 2012 at 10:05
  • Sorry to insist but that's not a MWE. It should start with \documentclass{} and up to \end{document} with necessary libraries etc. The common problem for us is to guess if any library is needed or not.
    – percusse
    Commented Aug 23, 2012 at 10:16
  • Sorry, I didn't realise that I should add the rest too (I thought that was part of being minimal). Here it is.
    – Vegard
    Commented Aug 23, 2012 at 10:20

1 Answer 1

9

Found the solution. Instead of

    edge from parent/.style={
            draw,
            bend left=25,
    },

I put

    edge from parent path={
            (\tikzparentnode\tikzparentanchor) edge [bend left=25]  (\tikzchildnode\tikzchildanchor)
    },

and it worked!

2
  • 2
    The explanation is that bend left only makes sense in a to or edge path construction. The default edge from parent path is drawn with just a line-to: --. Commented Aug 23, 2012 at 11:07
  • (Well done for figuring it out yourself, by the way) Commented Aug 23, 2012 at 11:08

You must log in to answer this question.

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