[Tex/LaTex] TikZ trees grow right typesets things “upside down”

tikz-pgftikz-trees

This is a pretty minor gripe with what is a great library.

\documentclass[border=3em]{standalone}
\usepackage{tikz}
\usetikzlibrary{trees}
\begin{document}
\begin{tikzpicture}[grow=right]
  \node {a}
    child {
      node {b}
    }
    child{
      node {c}
    };
\end{tikzpicture}
\end{document}

This MWE produces the following output:

tree upside down

Note that despite the b node being written before the c node, it is the c node that is on top. This is unintuitive. I'd have expected the b node to be on top, since it's defined first.

I understand why it works that way because without the grow=right option, things are typeset in the obvious order. What I want to know is:

Is there an easy way to have right-growing trees set their nodes in the order you'd expect from reading the source?


Edit

Matthew's suggestion in the comments works well for basic trees. Unfortunately, it breaks the sloped option:

\documentclass[border=3em]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\begin{tikzpicture}[grow=right,yscale=-1,sloped]
  \node {a}
    child {
      node {b}
      edge from parent
      node[above] {Foo}
    }
    child{
      node {c}
    };
\end{tikzpicture}
\end{tikzpicture}
\end{document}

slope is broke

Best Answer

You simply can use the grow' option instead: (pgfmanual v2.10, p.219)

This key has the same effect as grow, only the children are arranged in the opposite order.

\documentclass[border=0,png]{standalone}
\usepackage{tikz}
\usetikzlibrary{trees}
\begin{document}
\begin{tikzpicture}[grow'=right]
  \node {a}
    child {
      node {b}
    }
    child{
      node {c}
    };
\end{tikzpicture}
\end{document}

Result