0

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?

4
  • Can someone help please?
    – Ali
    Apr 25 at 22:33
  • After editing of your question a requirement is very different (and simpler) as before ...
    – Zarko
    Apr 26 at 23:01
  • And you change question again. What actually is your problem?
    – Zarko
    Apr 26 at 23:03
  • I think it is the same. I was trying to draw the diagram above. I saw no answers then I kept trying till I got some improved solution, but it still needs more correction to get the desired result. Is this clear now?
    – Ali
    Apr 27 at 0:06

2 Answers 2

3

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}
1
  • Many thanks Sandy. This is very helpful. Thanks again!
    – Ali
    Apr 27 at 5:18
2
  • your question is not clear, sorry.
  • your other image is simple to draw by use of forest package:

enter image description here

\documentclass[border=0.2 cm]{standalone}

\usepackage[edges]{forest}
\usetikzlibrary{arrows.meta}

\begin{document}
    \begin{forest}
for tree = 
{
    anchor = north,
    edge = {-Straight Barb, semithick},
    calign=edge midpoint,
    l sep = 7mm,
    s sep = 1mm,
}
[Temporal Expressions
    [TENSE
        [Present]
        [Past]
        [Futire]
    ]
    [ASPECT
        [grammatical
            [Perfective]
            [Imperfective]
            [Progressive]
        ]
        [Lexical
            [Atelic, 
                [States]
                [Activities]
            ]
            [Telic, 
                [Accomplishments]
                [Achievements]
            ]
        ]
    ]
]
\end{forest}
\end{document}

Unfortunately, the mix of tree styles is not simple (exceptions may be some forest gurus and the package author) to draw.

1
  • Thanks Zakro. Great help. And sorry for nor clarifying my question enough. This is good so far and, if you allow me, I am asking how draw the same tree in the picture. Anyway, many thanks again for the gentle help.
    – Ali
    Apr 27 at 0:30

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.