3

Can anyone help me to get this graphics in LaTeX with tools like TikZ, pstricks etc.?

enter image description here

3
  • 4
    Welcome to TeX.SX. Questions about how to draw specific graphics that just post an image of the desired result are really not reasonable questions to ask on the site. Please post a minimal compilable document showing that you've tried to produce the image and then people will be happy to help you with any specific problems you may have. See minimal working example (MWE) for what needs to go into such a document.
    – BambOo
    Commented Aug 4, 2018 at 9:28
  • 1
    Have a look at tex.stackexchange.com/questions/359105/qtree-and-tikz-qtree
    – BambOo
    Commented Aug 4, 2018 at 9:29
  • 2
    You could actually just include the graphic in the case you just “want that in LaTeX“ … Commented Aug 4, 2018 at 11:31

3 Answers 3

7
\documentclass[border=5pt,tikz]{standalone}
\usetikzlibrary{matrix,calc,arrows}
\begin{document}
    \begin{tikzpicture}[>=triangle 60,every node/.style={anchor=west}]
        \matrix (m) [matrix of nodes, row sep=0em, column sep=3em]
            { Giver\\
              Runner \\
              Killer \\
              Speaker \\
              Dancer \\
              Thinker \\
              Believer \\
              Knower \\
              Presumer \\
              Hearer \\
              Smeller \\
              Feeler \\
              Taster \\
              Liker \\
              Lover \\
              Hater \\
              Given to \\
              Sent to \\
              Handed to \\
              Seen \\
              Heard \\
              Liked \\
              Located \\
              Moved \\
              Given \\
              Broken \\
              Destroyed \\
              Killed \\};
                  \draw (m-1-1.east) --+ (4,-1) node[right] (agent) {Agent}-- (m-5-1.east);
                  \draw (m-6-1.east) --+ (2,-.75) node[right] (cognizer) {Cognizer} -- (m-9-1.east);
                  \draw (m-10-1.east) --+ (2,-.75) node[right] (perceiver) {Perceiver} -- (m-13-1.east);
                  \draw (m-14-1.east) --+ (2,-.5) node[right] (emoter) {Emoter} -- (m-16-1.east);
                      \draw (m-17-1.east) --+ (4,-.5) node[right] (recipient) {Recipient} -- (m-19-1.east);
                      \draw (m-20-1.east) --+ (4,-.5) node[right] (stimulus) {Stimulus} -- (m-22-1.east);
                      \draw (m-23-1.east) --+ (4,-.5) node[right] (theme) {Theme} -- (m-25-1.east);
                       \draw (m-26-1.east) --+ (4,-.5) node[right] (patient) {Patient} -- (m-28-1.east);
                   \draw (cognizer.east) --+ (2,-1.91) node[right] (experiencer) {Experiencer} -- (emoter.east);
                       \draw (perceiver.east) -- ($(cognizer.east)+(2,-1.91)$);
                   \draw (agent.east) -- (11,3) node[right] (actor) {Actor}-- (experiencer.east);
                       \draw (experiencer.east) --+ (3,-5.5) node[right] (undergoer) {Undergoer} -- (patient.east);
                           \draw (recipient.east) -- ($(experiencer.east)+(3,-5.5)$);
                           \draw (stimulus.east) -- ($(experiencer.east)+(3,-5.5)$);
                           \draw (theme.east) -- ($(experiencer.east)+(3,-5.5)$);
                           \draw (recipient.east) -- (11,3);
                       \draw (actor.east) --+ (2,-3.6) node[right] {Subject} -- (undergoer.east);
                   \draw[thick,->] (m-28-1.south east) -- ([yshift=-2.31cm]undergoer.south west) node[align=center,text width=11cm,midway,below] {Increasing generalization, increasing neutralization of semantic contrasts};
                       \node[xshift=.25cm,text width=2.5cm,above=.5cm] at (m-1-1.north east) {\bf Verb-specific semantic roles};
                       \node[xshift=5cm,text width=2.5cm,above=.5cm] at (m-1-1.north east) {\bf Thematic relations};
                       \node[xshift=10cm,text width=2.5cm,above=.5cm] at (m-1-1.north east) {\bf Semantic macroroles};
                       \node[xshift=15cm,text width=2.5cm,above=.5cm] at (m-1-1.north east) {\bf Grammatical relations};
        \end{tikzpicture}
\end{document}

The output:

Screenshot

EDIT: remove every node/.style={anchor=west} for a better result.

6

Just for fun: a forest alternative.

\documentclass[border=5pt]{standalone}
\usepackage{forest}
\begin{document}
\begin{forest}
for tree={
      grow=west,
      parent anchor=west,
      child anchor=east,
      s sep=1pt,
      l sep=1.3cm
     },
     where n children=0{tier=Left}{},
[Subject
 [Actor,name=Actor
  [Agent
   [Giver]
   [Runner]
   [Killer]
   [Speaker]
   [Dancer]
   ]
  [Experiencer,name=Experiencer
   [Cognizer
    [Thinker]
    [Believer]
    [Knower]
    [Presumer]
   ]
   [Perceiver
    [Hearer]
    [Smeller]
    [Taster]
    [Feeler]
   ]
   [Emoter
    [Liker]
    [Lover]
    [Hater]
   ]]
 ]
 [Undergoer,name=Undergoer
  [Recipient,name=Recipient
   [Given To]
   [Sent To]
   [Handed To]
  ]
  [Stimulus
   [Seen]
   [Heared To]
   [Liked To]
  ]
  [Theme
   [Located]
   [Moved]
   [Given]
  ]
  [Patient
   [Broken]
   [Destroyed]
   [Killed,name=Killed]
  ]
 ]
]    
\draw (Actor.west) -- (Recipient.east);
\draw (Undergoer.west) -- (Experiencer.east);
\draw[-latex] ([yshift=-2mm]Killed.south east) -- ++ (10cm,0) 
 node[midway,below,align=center]{Increasing generalization, increasing
 neutralization\\ of semantic contrasts};
\end{forest}
\end{document}

enter image description here

EDIT: Left-aligned leftmost items and added headers.

\documentclass[border=5pt]{standalone}
\usepackage{forest}
\usetikzlibrary{positioning}
\begin{document}
\begin{forest}
for tree={
      grow=west,
      parent anchor=west,
      child anchor=east,
      s sep=1pt,
      l sep=1.3cm
     },
     where n children=0{tier=Left,text width=width("Handed To")}{},
[Subject,name=Subject
 [Actor,name=Actor
  [Agent,name=Agent
   [Giver,name=Giver]
   [Runner]
   [Killer]
   [Speaker]
   [Dancer]
   ]
  [Experiencer,name=Experiencer
   [Cognizer
    [Thinker]
    [Believer]
    [Knower]
    [Presumer]
   ]
   [Perceiver
    [Hearer]
    [Smeller]
    [Taster]
    [Feeler]
   ]
   [Emoter
    [Liker]
    [Lover]
    [Hater]
   ]]
 ]
 [Undergoer,name=Undergoer
  [Recipient,name=Recipient
   [Given To]
   [Sent To]
   [Handed To]
  ]
  [Stimulus
   [Seen]
   [Heared To]
   [Liked To]
  ]
  [Theme
   [Located]
   [Moved]
   [Given]
  ]
  [Patient
   [Broken]
   [Destroyed]
   [Killed,name=Killed]
  ]
 ]
]    
\draw (Actor.west) -- (Recipient.east);
\draw (Undergoer.west) -- (Experiencer.east);
\draw[-latex] ([yshift=-2mm]Killed.south east) -- ++ (10cm,0) 
 node[midway,below,align=center]{Increasing generalization, increasing
 neutralization\\ of semantic contrasts};
\node[anchor=west,above=6mm of Giver,align=left,font=\bfseries] (Verb)  {Verb-specific\\ semantic roles};
\node[anchor=east,align=right,font=\bfseries] at (Verb.west -| Agent.west)  {Thematic relations};
\node[anchor=center,align=center,font=\bfseries] at (Verb.west -| Actor.center) 
{Semantic\\ macroroles};
\node[anchor=center,align=left,font=\bfseries] at (Verb.west -| Subject.center) 
{Grammatical\\ relations};
\end{forest}
\end{document}

enter image description here

6
  • 1
    (+1) But it would be better to use a named dimension for the width of 'handed to' as you're calculating it using pgfmath for every one of the left hand nodes, which is extremely inefficient. You could also say delay={tempdima/.max={>OOw2{max x}{min x}{#1-#2}}{fake=root,leaves}, for nodewalk={fake=r,leaves}{text width/.register=tempdima}}. If you wanted to. Using parent and child anchors which are sensitive to direction of growth makes tree specifications more flexible. Using l sep' and s sep' is faster than l sep and s sep. You can also avoid naming nodes and/or use the tikz key.
    – cfr
    Commented Aug 5, 2018 at 1:05
  • @cfr Thanks once more! Of course I was suspecting there is such a solution but lazy as I am I did not read the manual. (It is much easier to just wait till you show up ;-) (Just kidding ;-) But how would one avoid naming the nodes, after all I want to draw additional lines?
    – user121799
    Commented Aug 5, 2018 at 1:10
  • @cfr Thanks again, just to let you know I could not make delay={tempdima/.max={>OOw2{max x}{min x}{#1-#2}}{fake=root,leaves}, for nodewalk={fake=r,leaves}{text width/.register=tempdima}} work. There was some obvious issue: the underscores in max_x and min_x got swallowed. But even when I fixed that I get the error ! Package forest Error: Comparison ("<" or ">") of generic type arguments "0.0pt-0.0pt" and "0.0pt-0.0pt" makes no sense. Could you perhaps tell me where that might come from?
    – user121799
    Commented Aug 6, 2018 at 3:01
  • Sorry, I screwed up. ....
    – cfr
    Commented Aug 8, 2018 at 1:08
  • Please see answer below. Note that the lack of underscores is not the error. They were never there and were never meant to be there or needed. I forgot +d i.e. I needed OOw2+d and not just OOw2. And also to delay it for longer, I think.
    – cfr
    Commented Aug 8, 2018 at 23:28
1

This answer is a modification of marmot's very nice solution, which automates adding extra edges and tries to avoid so much hard-coding of things which might change.

% addaswyd o ateb marmot: https://tex.stackexchange.com/a/444593/
\documentclass[border=10pt]{standalone}
\usepackage{forest}
\usetikzlibrary{positioning,arrows.meta}
\forestset{
  declare keylist={extra forest edges}{},
  declare boolean={draw extra edges}{0},
  align middle child/.style={
    before typesetting nodes={
      if={
        > Ow+P {n children}{isodd(##1)}
      }{
        calign child/.process={
          Ow+n {n children}{(##1+1)/2}
        },
        calign=child edge,
      }{},
    },
  },
  align middle children/.style={
    for tree={align middle child},
  },
  join from/.style={
    if draw extra edges={}{draw extra forest edges},
    before typesetting nodes={temptoksa/.option=#1.name, extra forest edges/.register=temptoksa},
  },
  join to/.style={
    before typesetting nodes={temptoksa/.option=name, if={>O{#1.draw extra edges}}{}{#1.draw extra forest edges}, #1.extra forest edges/.register=temptoksa},
  },
  draw extra forest edges/.style={
    draw extra edges,
    before drawing tree={
     tikz+/.process={OOw2{edge}{extra forest edges}{\foreach \i in {##2} \path [##1] ({\i}.parent anchor) -- (.child anchor);}},
    },
  },
}
\begin{document}
\begin{forest}
  for tree={
    grow=180,
    parent anchor=children,
    child anchor=parent,
    s sep'=1pt,
    l sep'=13mm,
    font=\sffamily,
  },
  before typesetting nodes={
    tempdima/.max={>Ow+P{content}{width("#1")}}{fake=r,leaves},
    for nodewalk={fake=r,leaves}{text width/.register=tempdima, tier=terminus},
  },
  align middle children,
  [Subject 
  [Actor, join to=!rl1
    [Agent
    [Giver]
    [Runner]
    [Killer]
    [Speaker]
    [Dancer]
    ]
    [Experiencer, join from=!rl
    [Cognizer
      [Thinker]
      [Believer]
      [Knower]
      [Presumer]
    ]
    [Perceiver
      [Hearer]
      [Smeller]
      [Taster]
      [Feeler]
    ]
    [Emoter
      [Liker]
      [Lover]
      [Hater]
    ]]
  ]
  [Undergoer
    [Recipient
    [Given To]
    [Sent To]
    [Handed To]
    ]
    [Stimulus
    [Seen]
    [Heared To]
    [Liked To]
    ]
    [Theme
    [Located]
    [Moved]
    [Given]
    ]
    [Patient
    [Broken]
    [Destroyed]
    [Killed]
    ]
  ]
  ]   
  \begin{scope}[font=\bfseries\sffamily, align=center, anchor=mid]
    \foreach \i/\j in {n/north,s/south,w/west,e/east,nw/north west,ne/north east,sw/south west,se/south east} \coordinate (\i) at (current bounding box.\j);
    \foreach \i/\j [count=\n] in {L/Verb-specific\\semantic roles,r/Grammatical\\relations,r1/Semantic\\macroroles} \node (n\n) [above=of n -| !\i.center] {\j};
    \path (n1.mid -| !r11.center) -- (n1.mid -| !r121.center) node [midway] {Thematic relations};
  \end{scope}
  \draw [-Latex, thick] (!L.parent |- s) -- (!r.children |- s) node [midway, font=\sffamily, below, align=center] {Increasing generalization, increasing neutralization\\of semantic contrasts};
\end{forest}
\end{document}

attempt at more flexible/automated solution with less hard-coding

You must log in to answer this question.

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