formatting,diagrams,tikz-styles,trees – Creating Tree Diagrams with Filesystem Branches in TikZ

diagramsformattingtikz-stylestrees

I am trying to draw this tree diagram exactly:

enter image description here

I edited my code and it looks better, but still needs more work.

Here is the code and result:

\usetikzlibrary {trees}
\tikz [font=\footnotesize,grow=down, level 1/.style={->, sibling distance=20em},
,level 2/.style={->, sibling distance=8em}, level distance=3cm]

\node {Temporal Expressions}
   child { node {Tense}
      child { node {Past} }
      child { node {Present} }
      child { node {Future} }
  } ...

enter image description here

When I pass the following code to with this option to {Aspect} node:

 child [->, edge from parent fork down, sibling distance=30mm, level distance=30mm] { node {Aspect} ...

`
The output displays as this:

enter image description here

Any suggestions to fix?

Best Answer

This can be done with forest, but it requires some manual adjustment because of the way the folder style interacts with the standard style.

enter image description here

\documentclass{article}

\usepackage[edges]{forest}
\forestset{fold/.style={folder, grow'=0, s sep=0pt},
    arr/.style={edge=-latex}}

\begin{document}

\begin{forest}
    for tree={font=\footnotesize, parent anchor=south, child anchor=north}
    [LINGUISTIC TIME, s sep=1cm
        [TENSE, arr, for tree={fold}, before computing xy={s-=5mm}
            [Present]
            [Past]
            [Future]]
        [ASPECT, arr, l+=3.2mm, s sep=1cm
            [Grammatical, arr, for tree={fold}, before computing xy={s-=5mm}
                [Perfective]
                [Imperfective]
                [Progressive]]
            [Lexical, arr, l+=3.2mm, before computing xy={s-=5mm}
                [Atelic, forked edge, for tree={fold}, before computing xy={s-=5mm, l-=5mm}
                    [States]
                    [Activities]]
                [Telic, forked edge, for tree={fold}, before computing xy={s-=5mm, l-=5mm}
                    [Accomplishments]
                    [Achievements]]]]]
\end{forest}

\end{document}
Related Question